fix: restore append future position - #336
Open
RongtongJin wants to merge 1 commit into
Open
Conversation
RongtongJin
marked this pull request as ready for review
August 13, 2026 11:14
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.
What changed
AppendFuturebefore returning it.Why
The append path refactor stopped propagating the appended entry position to
AppendFuture, so a successful append still returned-1fromgetPos(). The previous implementation set this value immediately inwaitAck(), and downstream consumers such as RocketMQ use the local position before quorum completion.For batch appends, the base future position remains the last appended entry, matching the previous behavior; all individual positions are still available through
BatchAppendFuture#getPositions().This was found while validating apache/rocketmq#10650 against the current DLedger source.
Verification
expected: 0 / 6192, actual: -1.AppendAndPushTestpassed (6tests,0failures).mvn -B -ntp -nsu -Djacoco.skip=true -DskipTests clean package: all reactor modules passed.0.95disk-full threshold. The same415 DISK_FULLfailure was reproduced on an unmodifiedorigin/masterworktree, so it is unrelated to this change.