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

AeronArchive sometimes throws TimeoutException #524

Closed
zyulyaev opened this issue Jul 10, 2018 · 1 comment
Closed

AeronArchive sometimes throws TimeoutException #524

zyulyaev opened this issue Jul 10, 2018 · 1 comment
Labels

Comments

@zyulyaev
Copy link

zyulyaev commented Jul 10, 2018

Following snippet sometimes throws TimeoutException on archive.stopRecording(channel, 1); line.

String aeronDirName = Files.createTempDirectory("md").toString();
try (ArchivingMediaDriver mediaDriver = ArchivingMediaDriver.launch(
    new MediaDriver.Context()
        .threadingMode(ThreadingMode.SHARED)
        .aeronDirectoryName(aeronDirName),
    new Archive.Context()
        .aeronDirectoryName(aeronDirName)
        .threadingMode(ArchiveThreadingMode.SHARED)
        .archiveDir(Files.createTempDirectory("ar").toFile())
)) {
    try (Aeron aeron = Aeron.connect(new Aeron.Context()
        .aeronDirectoryName(mediaDriver.mediaDriver().aeronDirectoryName()));
         AeronArchive archive = AeronArchive.connect(new AeronArchive.Context()
             .aeron(aeron)))
    {
        String channel = "aeron:udp?endpoint=127.0.0.1:9000";
        archive.startRecording(channel, 1, SourceLocation.LOCAL);
        archive.startRecording(channel, 2, SourceLocation.LOCAL);
        aeron.addPublication(channel, 1);
        aeron.addPublication(channel, 2);
        archive.stopRecording(channel, 1);
        archive.stopRecording(channel, 2);
    }
}
@mjpt777 mjpt777 added the bug label Jul 10, 2018
@mjpt777
Copy link
Contributor

mjpt777 commented Jul 10, 2018

The archive should enqueue new recordings.

I'll also update the Aeron client so it detects a reentrant call when current request is active.

mjpt777 added a commit that referenced this issue Jul 11, 2018
…chive so they are run asynchronously and not on the callback to avoid reentrancy issues. Issue #524.
@mjpt777 mjpt777 closed this as completed Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants