minor: Add logs and metrics observability to the segment upgrade path that fires while using concurrent locking#19651
Open
capistrant wants to merge 1 commit into
Conversation
…ncurrent append and replace ingestion mets checkpoint doc and test tidy up self review
FrankChen021
reviewed
Jul 3, 2026
FrankChen021
left a comment
Member
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency/lifecycle, security, data loss, API compatibility, and missing-test risks; no high-confidence issues found.
Reviewed 11 of 11 changed files.
This is an automated review by Codex GPT-5.5
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.
Description
Investigating potential issues with concurrent append and replace actions not being properly accepted and reflected on realtime ingestion tasks who should be upgrading their segments to reflect the concurrent append that happened on an interval they are ingesting to. This PR attempts to add some logs and metrics to the related code to help give observability into the process and smoke out if there are indeed issues going on. Biggest risk of these new mets and logs is probably chattiness, since they scale with the volume of upgrade segments that may be existing under a clusters normal operaions.
New Metrics
ingest/segmentUpgrade/countdataSource,taskId,taskType,groupId,tagsingest/segmentUpgrade/notifiedingest/segmentUpgrade/count:countshould equalnotified+unmatchedover the same period anddataSource.supervisorId,dataSource,stream,tagscountin a healthy cluster.ingest/segmentUpgrade/unmatchedsupervisorId,dataSource,stream,tagsingest/segmentUpgrade/sendFailedsupervisorId,dataSource,stream,taskId,tagsingest/segmentUpgrade/announcedingest/segmentUpgrade/count, which is per-segment rather than per-replica.dataSource,taskId,taskType,groupId,tagsingest/segmentUpgrade/skippedreasondimension is one ofunknownBase(the request reached the wrong task),noSink(the base sink is no longer present), ordropping(the base sink is handing off, which is benign and covered by the durable publish path).dataSource,taskId,taskType,groupId,tags,reasonreason=dropping.Release note
TBD
Key changed/added classes in this PR
TBD
This PR has: