Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java] Fix issue where multiple archive clients are trying to connect. #634

Merged
merged 1 commit into from Feb 11, 2019

Conversation

JPWatson
Copy link
Collaborator

@JPWatson JPWatson commented Feb 11, 2019

When spawning clients simultaneously the following exception is thrown in some of the clients:

io.aeron.exceptions.TimeoutException: awaiting response - correlationId=24
	at io.aeron.archive.client.AeronArchive.checkDeadline(AeronArchive.java:1008)
	at io.aeron.archive.client.AeronArchive.pollNextResponse(AeronArchive.java:1122)
	at io.aeron.archive.client.AeronArchive.awaitSessionOpened(AeronArchive.java:1021)
	at io.aeron.archive.client.AeronArchive.<init>(AeronArchive.java:109)
	at io.aeron.archive.client.AeronArchive.connect(AeronArchive.java:183)
	at io.aeron.archive.ArchiveTest.lambda$shouldAllowMultipleConnectionsInParallel$0(ArchiveTest.java:56)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

The ControlResponsePoller expects that calling BREAK will stop the polling operation but when there are multiple Images, subsequent Images will be polled and messages are lost.
Reducing the fragmentLimit is the simplest way I can see to fix this for the time being.
It might be worth adjusting the contract for Subscription.controlledPoll so that anything other than a CONTINUE would stop the current polling operation.

@mjpt777 mjpt777 merged commit 6f6bed0 into real-logic:master Feb 11, 2019
@JPWatson JPWatson deleted the archive-client branch February 11, 2019 13:14
mjpt777 added a commit that referenced this pull request Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants