Skip to content

[server] Refine remote log manifest overlap handling - #3937

Merged
wuchong merged 1 commit into
apache:mainfrom
wuchong:codex/resolve-remote-log-todos
Aug 11, 2026
Merged

[server] Refine remote log manifest overlap handling#3937
wuchong merged 1 commit into
apache:mainfrom
wuchong:codex/resolve-remote-log-todos

Conversation

@wuchong

@wuchong wuchong commented Aug 10, 2026

Copy link
Copy Markdown
Member

Purpose

Follow up on the remote log overlap manifest handling introduced by #3822 and resolve the remaining implementation follow-ups.

Brief change log

  • Keep manifest start/end getters aligned with physical remote segment offsets.
  • Make immutable remote manifest snapshot reads lock-free.
  • Remove the obsolete incremental RemoteLogTablet mutation helper.
  • Clarify timestamp lookup behavior and update overlap regression coverage.

Tests

  • ./mvnw -pl fluss-common -DskipITs -Dfast -Dtest=RemoteLogManifestOverlapTest test (11 tests)
  • ./mvnw -pl fluss-server -am -DskipITs -Dfast -Dtest=RemoteLogTabletTest,RemoteLogTabletOverlapTest,DefaultRemoteLogStorageTest -Dsurefire.failIfNoSpecifiedTests=false test (22 tests)
  • Checkstyle, Spotless, and RAT checks passed in the reactor build.

API and Format

  • Remote manifest start/end getters now consistently report physical remote offsets.
  • No storage format changes.

Documentation

No user-facing documentation changes are required.

Generative AI disclosure

  • Yes — Codex (gpt-5.6-sol), reviewed by the human developer.

Use physical manifest offsets where required, simplify RemoteLogTablet snapshot reads, and remove the obsolete incremental mutation helper. Keep overlap and timestamp lookup behavior covered by updated tests.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-5.6-sol
AI-Contributed/Feature: 112/112
AI-Contributed/UT: 130/130
@wuchong
wuchong marked this pull request as ready for review August 10, 2026 16:12
@wuchong

wuchong commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

cc @gyang94

for (RemoteLogSegment remoteLogSegment : remoteLogSegmentList) {
if (remoteLogSegment.logicalStartOffset() < startOffset) {
startOffset = remoteLogSegment.logicalStartOffset();
if (remoteLogSegment.remoteLogStartOffset() < startOffset) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes the physical range is not equal to logical range. Use physical range may expose unavailable data to uers.

Assume:

  1. There is a remote manifest contains A:[0,10), B:[10,20)
  2. A expired, the manifest visible range is [10,20)
  3. leader switch, new physical segment is [5,25)
  4. After merge, there is only one segment should be with physical range [5,25), but logical range should be [10,25).

The hidden prefix [5,10) should not be readable again.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @gyang94 , I think we can create a follow-up pull request to address this.

@wuchong
wuchong merged commit fb1e9f6 into apache:main Aug 11, 2026
26 of 27 checks passed
@wuchong
wuchong deleted the codex/resolve-remote-log-todos branch August 11, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants