aeron: Aeron Archive - potential bug extend recordings on same channel different stream id
There seems to be a potential bug in the archive if you try extending multiple exclusive publications on the same channel but different streams. The archive seems to be creating a duplicate recording out of nowhere and the extend fails with cannot extend active recording. As we are trying to use extend, we first query the archive for existing recordings but we unexpectedly get two recordings for a channel/stream, which should never be the case.
- create and record two publications on the same channel and two different stream ids. You will notice in the archive there are three recordings instead of two!
- stop the app and the archive
- start the archive
- start the application, query the archive for existing recordings, extend the existing recordings. Fail.
[464454.516705666] ARCHIVE: RECORDING_SIGNAL [52/52]: controlSessionId=391404064 correlationId=41 recordingId=3 subscriptionId=42 position=0 signal=START
[464454.516968500] ARCHIVE: RECORDING_SESSION_STATE_CHANGE [41/41]: recordingId=3 position=0 INIT -> RECORDING reason=""
[464454.537479000] ARCHIVE: RECORDING_SIGNAL [52/52]: controlSessionId=391404064 correlationId=41 recordingId=4 subscriptionId=42 position=0 signal=START
I see in the logs it’s starting a recording for the same same subscription id twice but there are two different recordings in there. Something is up.
Note I am using the Archive C client.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- [Java] Add failing test for #1719. — committed to aeron-io/aeron by vyazelenko 2 years ago
- [Java] Add failing test for #1719. — committed to New-Earth-Lab/aeron by vyazelenko 2 years ago
Fixed with #1722.
I believe I’ve found the issue and have opened a PR: https://github.com/real-logic/aeron/pull/1722
@matteo-gsr There seems to be a bug in the C media driver around spy matching logic. I was able to reproduce the issue without an Archive.