Skip to content

Commit

Permalink
fix race in Replayer
Browse files Browse the repository at this point in the history
java.lang.IllegalStateException: Unknown session: sessionId=1,connectionId=1862197465265022976
	at uk.co.real_logic.artio.engine.logger.Replayer.processResendRequest(Replayer.java:387)
	at uk.co.real_logic.artio.engine.logger.Replayer.onResendRequest(Replayer.java:315)
	at uk.co.real_logic.artio.engine.logger.Replayer.onFragment(Replayer.java:208)
	at io.aeron.Image.controlledPoll(Image.java:385)
	at io.aeron.Subscription.controlledPoll(Subscription.java:235)
	at uk.co.real_logic.artio.engine.logger.Replayer.doWork(Replayer.java:473)
	at org.agrona.concurrent.CompositeAgent.doWork(CompositeAgent.java:120)
	at org.agrona.concurrent.AgentRunner.doWork(AgentRunner.java:304)
	at org.agrona.concurrent.AgentRunner.workLoop(AgentRunner.java:296)
	at org.agrona.concurrent.AgentRunner.run(AgentRunner.java:162)
	at java.base/java.lang.Thread.run(Thread.java:840)
  • Loading branch information
wojciech-adaptive committed Sep 2, 2024
1 parent 89b7ca3 commit 365cc5c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ else if (fixPConnectionIds.contains(connectionId))
return session;
}

throw new IllegalStateException("Unknown session: sessionId=" + sessionId + ",connectionId=" + connectionId);
// ManageSession and ValidResendRequest might race each other (different sessions), so it's possible we see
// VRR before MS and sessionCodecs is null, simply wait in this case for the other image to catch up.
return null;
}

private FixReplayerSession processFixResendRequest(
Expand Down

0 comments on commit 365cc5c

Please sign in to comment.