Re: [Quickfix-developers] Incorrect handling of SequenceReset
Brought to you by:
orenmnero
|
From: Caleb E. <cal...@gm...> - 2006-05-01 13:03:39
|
On 4/29/06, Brian Erst <azz...@ya...> wrote: > That code was rearranged because otherwise we would timeout (heartbeat) w= hile > processing gap-fills/sequence resends. If you check the sequence number p= rior to > incrementing the received time, the heartbeat timeout got triggered and t= he session > would drop. > > We'll have to be careful how to rearrange the code so we don't fix the ne= w problem by reintroducing the old one. > > I'm attaching the original email chain that caused us to create the exist= ing code (Jun 27 2005 patch to Session.cpp). The change you outline was made to Session.cpp in between releases 1.9.4 and 1.10.2 of QuickFIX, as was the change I made to "optimize" the ResendRequest processing. I think the two have similar aims. In versions of QuickFIX prior to and including 1.9.4, a big gap fill could take a number of disconnect/reconnect iterations before it would get cleared up. This was because QuickFIX would potentially issue multiple ResendRequest messages for an identical range of messages, causing needless extra traffic and delays before the Session was able to catch up with the far-end. This would cause lastReceivedTime not to be updated, because messages in the proper range were not being received. Since 1.10.2, the QF code should issue one and only one ResendRequest when it detects a gap, and almost immediately start receiving "in-sequence" messages from the far end, which would cause the old lastReceivedTime update logic to function correctly AFAICT. I think the lastReceivedTime update should be moved back where it was in version 1.73 of Session.cpp. This would allow a proper disconnect when a connection isn't properly syncing or heartbeating. The way the code is setup now, a conneciton will never drop as long as the far end is sending SOME valid FIX messages! This is definitely a bit tricky and we should probably come up with a test for this. -- Caleb Epstein caleb dot epstein at gmail dot com |