Conversation
Collaborator
Author
|
Posting this as a draft for now. I still need to review the code the AI agent produced. |
be848cc to
87b494e
Compare
Introduce RPCObserver, an optional interface that RPCs can implement to track per-attempt timing and completion statistics. Scan implements it by moving the stats-building logic (previously in client.scanRpcScanStats) into Scan.SetSendTime and Scan.OnComplete methods. This encapsulates scan stats handling within the Scan type rather than requiring the top-level SendRPC function to have scan-specific knowledge.
Record the RPC send time right after registerRPC() returns, which is after the congestion control token bucket releases the RPC. This gives a more accurate start time than the previous approach of capturing it in SendRPC before the RPC is queued, since the token bucket can delay scans arbitrarily.
Replace four scan type assertions in SendRPC with a single RPCObserver interface check. Remove scanRpcScanStats and the pb import it required. The scan stats callback is now triggered through the RPCObserver interface, so SendRPC no longer needs to know about scan RPCs. Update TestScanRPCScanStatsScanMetricsNonScanResponse to call Scan.OnComplete directly instead of the removed scanRpcScanStats.
ciacono
approved these changes
Apr 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.
This fixes an issue where the duration of a scan request includes the time it is queued within gohbase waiting for the congestion control to release the scan.