Repository navigation
fix: avoid snapshot-read close metadata NPE - #3654
Merged
Merged
Conversation
Gezi-lzq
force-pushed
the
fix/snapshot-read-close
branch
from
October 13, 2026 02:16
92a878b to
35047dc
Compare
Gezi-lzq
force-pushed
the
fix/snapshot-read-close
branch
from
October 13, 2026 03:10
35047dc to
5aa3af4
Compare
Gezi-lzq
force-pushed
the
fix/snapshot-read-close
branch
from
October 13, 2026 03:16
5aa3af4 to
ce4b840
Compare
superhx
reviewed
Oct 13, 2026
Gezi-lzq
force-pushed
the
fix/snapshot-read-close
branch
from
October 13, 2026 03:39
ce4b840 to
a9588ee
Compare
Gezi-lzq
enabled auto-merge (squash)
October 13, 2026 05:38
superhx
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Snapshot-read
ElasticLoginstances intentionally have noMetaStreamorElasticLogSegmentManager. During partition removal or replacement,ElasticLog.close()still executed the normal metadata lifecycle and dereferenced those null components, producingSNAPSHOT_SUBSCRIBE_ERROR.What
MetaStream.beforeClose, log metadata persistence, and partition metadata persistence when closing snapshot-read logs.ElasticLogclose path unchanged.This PR intentionally does not change
SnapshotReadPartitionsManager, request retry policy, or subscriber state convergence.Test
The regression test builds a snapshot-read log with real segment metadata, closes it, and verifies that its data streams are closed. This avoids the former empty-log false positive where an
activeSegmentfailure was swallowed internally.Verification
./gradlew core:S3UnitTest --tests kafka.log.streamaspect.ElasticLogTest.testSnapshotReadCloseSkipsMetadataLifecyclegit diff --checkBoth pass.