[QFJ-484] Session responder lock change inadequate Created: 17/Nov/09 Updated: 29/Apr/11 Resolved: 29/Apr/11 |
|
| Status: | Closed |
| Project: | QuickFIX/J |
| Component/s: | Engine |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Default |
| Reporter: | James Olsen | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Using a synchronized block can result in a thread being starved of access to the responder. This should be changed to use a Lock with fair semantics. Starvation was observed in a scenario using SocketSynchronousWrites=Y where a slow consumer could not be disconnected because the message writing thread kept re-obtaining the monitor. |
| Comments |
| Comment by James Olsen [ 17/Nov/09 ] |
|
Relates to change proposed by |
| Comment by James Olsen [ 17/Nov/09 ] |
|
No option to attach patch, so will try in-lining: Index: core/src/main/java/quickfix/Session.java import quickfix.Message.Header; private boolean enabled;
@@ -330,19 +332,25 @@
@@ -1436,13 +1444,16 @@
|
| Comment by James Olsen [ 16/Feb/10 ] |
|
Attached Parwdiner's change is critical when using synchronous writes when you have multiple sessions running. |
| Comment by James Olsen [ 17/Jan/11 ] |
|
Copy of patch as applied to 1_5_0 Session source. |
| Comment by Eric Deshayes [ 28/Apr/11 ] |
|
committed on integration branch rev #1024 |
| Comment by Eric Deshayes [ 29/Apr/11 ] |
|
After discussion, the usage of Reentrant Lock would likely cause some throughput/latency performance. |