[ISSUE #10879] Refresh update timestamp on replaced topic metadata - #10923
[ISSUE #10879] Refresh update timestamp on replaced topic metadata#10923btlqql wants to merge 1 commit into
Conversation
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
This PR fixes a bug in DefaultMetadataStore where metadata.setUpdateTimestamp() was called instead of topicMetadata.setUpdateTimestamp() when replacing topic metadata. The wrong variable was being updated, meaning the topic metadata's timestamp was never refreshed on replacement.
This is the most comprehensive PR in the series (#10914-#10923), containing all fixes plus this additional timestamp fix.
LGTM. Correct fix.
Note: As this PR contains all changes from #10914-#10922, merging this single PR would be the most efficient approach. The other PRs in the series will conflict if merged independently.
Automated review by github-manager-bot
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review Summary
This PR fixes a bug in DefaultMetadataStore.updateTopicMetadata where the update timestamp was being set on the wrong variable.
Issue: The code was calling metadata.setUpdateTimestamp(...) instead of topicMetadata.setUpdateTimestamp(...), meaning the actual topic metadata being returned to callers never received the updated timestamp.
Fix: Corrected to set the timestamp on topicMetadata which is the object actually returned.
Findings
- [Critical] DefaultMetadataStore.java:249 — Wrong variable updated:
metadatavstopicMetadata. This is a clear bug that would cause stale timestamp information for topic metadata consumers. - [Info] The fix is minimal and correct. Good catch.
Overall
Clean, targeted fix. The bug would cause downstream consumers to see stale update timestamps, potentially affecting cache invalidation or sync logic.
Automated review by RockteMQ-AI
|
This PR has conflicts with the base branch and cannot be merged. Please rebase or merge the base branch into your branch and resolve the conflicts: git fetch origin
git checkout btlqql/fix-stale-update-timestamp
git rebase origin/develop
# resolve conflicts, then:
git push --force-with-leaseThis is a one-time reminder. Feel free to @mention me for a re-review after conflicts are resolved. Automated notification by github-manager-bot |
a8dae00 to
8a8efe6
Compare
RockteMQ-AI
left a comment
There was a problem hiding this comment.
LGTM. Trivial change, looks good.
Automated review by github-manager-bot
What is the purpose of the change
Fix #10879.
DefaultMetadataStore.updateTopic refreshed the update timestamp on the currently stored metadata object, then replaced the map entry with the caller-provided TopicMetadata. When the caller supplied a distinct replacement object, the stored entry kept a stale update timestamp.
Brief changelog
How was this patch verified
git diff --checkclean