{"record":{"id":"715c3bf0619b5b5e","repo":"aeron-io/aeron","slug":"unknown-recording-id-recordingid","errorCode":null,"errorMessage":"unknown recording id: \" + recordingId","messagePattern":"unknown recording id: \" \\+ recordingId","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"aeron-archive/src/main/java/io/aeron/archive/Catalog.java","lineNumber":683,"sourceCode":"        final long recordingId,\n        final long startPosition,\n        final long stopPosition,\n        final long startTimestamp,\n        final long stopTimestamp,\n        final int imageInitialTermId,\n        final int segmentFileLength,\n        final int termBufferLength,\n        final int mtuLength,\n        final int sessionId,\n        final int streamId,\n        final String strippedChannel,\n        final String originalChannel,\n        final String sourceIdentity)\n    {\n        final int recordingOffset = recordingDescriptorOffset(recordingId);\n        if (-1 == recordingOffset)\n        {\n            throw new ArchiveException(\"unknown recording id: \" + recordingId);\n        }\n\n        final int recordingLength = fieldAccessBuffer.getInt(\n            recordingOffset + RecordingDescriptorHeaderDecoder.lengthEncodingOffset(), BYTE_ORDER);\n        final int oldFrameLength = align(recordingLength + DESCRIPTOR_HEADER_LENGTH, alignment);\n        final int newFrameLength = recordingDescriptorFrameLength(strippedChannel, originalChannel, sourceIdentity);\n        final int length, checksumLength;\n        if (newFrameLength > oldFrameLength)\n        {\n            length = checksumLength = newFrameLength - DESCRIPTOR_HEADER_LENGTH;\n\n            final int shiftBytes = newFrameLength - oldFrameLength;\n            final int endOfLastRecording = nextRecordingDescriptorOffset;\n            if (endOfLastRecording + shiftBytes > capacity)\n            {\n                growCatalog(MAX_CATALOG_LENGTH, shiftBytes);\n            }\n","sourceCodeStart":665,"sourceCodeEnd":701,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-archive/src/main/java/io/aeron/archive/Catalog.java#L665-L701","documentation":"Catalog.extendRecording (used when extending an existing recording) resolves the recordingId to a descriptor offset via recordingDescriptorOffset. If the ID is not present in the catalog it returns -1, and this ArchiveException is thrown because an existing recording cannot be extended that does not exist.","triggerScenarios":"Calling ArchiveClient.extendRecording/recordingSession with a recordingId that is absent from the catalog, or extending a recording after its catalog entry was removed.","commonSituations":"Replaying-and-extending a recording whose ID was mistyped or came from a different archive; extending a recording that was purged; stale configuration pointing at an old recordingId after catalog truncation.","solutions":["List catalog entries (`ArchiveTool describe <archiveDir>`) and confirm the recordingId exists before extending.","Correct the recordingId passed to extendRecording.","Start a fresh recording instead of extending if the original was deleted."],"exampleFix":"// before\narchive.extendRecording(9999L, ...); // unknown id\n// after: verify first\nif (archive.listRecording(9999L) != null) { archive.extendRecording(9999L, ...); }","handlingStrategy":"validation","validationCode":"// Validate recordingId exists before extending\nif (archive.listRecording(recordingId) == null) {\n    throw new IllegalArgumentException(\"recordingId \" + recordingId + \" not present in catalog\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    subscription = archive.extendRecording(recordingId, ...);\n} catch (ArchiveException e) {\n    if (e.getMessage().startsWith(\"unknown recording id\")) {\n        // fall back to startRecording() or re-resolve the id from the catalog\n    } else { throw e; }\n}","preventionTips":["Persist recordingIds from the control-session response (RecordingStarted) rather than retyping them.","Before extending, confirm the recording still exists via ArchiveTool or listRecording.","Do not extend recordings across different archive directories."],"tags":["aeron-archive","catalog","extend-recording","recording-not-found"],"backgroundTag":"record-not-found","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}