[QFJ-773] 'MessageStore.reset()' called extraneously outside session time window Created: 12/Feb/14 Updated: 02/Apr/15 Resolved: 16/Apr/14 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | 1.5.3 |
Fix Version/s: | 1.6.0 |
Type: | Improvement | Priority: | Default |
Reporter: | Tommy Hannon | Assignee: | Christoph John |
Resolution: | Fixed | Votes: | 0 |
Labels: | MessageStore, Session |
Description |
The 'MessageStore.reset()' method is being called every second when beyond the session time window. After reviewing the QF/J source code, the problem seems to be originating from the "QFJ Timer" thread calling 'Session.next()'. The following code appears at line 1748 of the 'quickfix/Session.java' class in QuickFIX/J 1.5.3 source code directory... if (!checkSessionTime()) { reset(); return; }Due to the timer thread, this occurs every second for every session and can be quite resource intensive... especially if there is a substantial number of sessions defined that are not within the configured session start/end times. |
Comments |
Comment by Tommy Hannon [ 12/Feb/14 ] |
It was suggested that the fix might be to check if the sequence numbers are both at 1 and suppress the reset if that is the case. Please consider how this might affect the session creation time that is saved in MessageStore. |
Comment by Christoph John [ 12/Feb/14 ] |
I tried to introduce the check for the sequence number and a couple of unit tests failed as a result. So need to check further how and why the session creation time is used. |
Comment by Christoph John [ 21/Mar/14 ] |
Hi Tommy, do you have any logic in your code which is using the creation time of the MessageStore? Or why should that be considered? |
Comment by Tommy Hannon [ 28/Mar/14 ] |
Hi, John. No, I do not have any logic referring to the creation time other than actually storing it. The reason I said to consider it is because the creation time may need to be stored even if the sequence numbers are both '1' (e.g. an acceptor session that has not connected during the configured session time). There may be other circumstances as well. |
Comment by Christoph John [ 16/Apr/14 ] |
Committed as http://sourceforge.net/p/quickfixj/code/1179/ |