Skip to content

AeronArchive sometimes throws TimeoutException #524

@zyulyaev

Description

@zyulyaev

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);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions