Skip to content

Add last replica ID to GetRangeDebugInfo#11168

Merged
vanja-p merged 5 commits intomasterfrom
vanja-lastreplicaid
Feb 26, 2026
Merged

Add last replica ID to GetRangeDebugInfo#11168
vanja-p merged 5 commits intomasterfrom
vanja-lastreplicaid

Conversation

@vanja-p
Copy link
Contributor

@vanja-p vanja-p commented Jan 23, 2026

No description provided.

@vanja-p vanja-p requested a review from luluz66 January 23, 2026 21:58
func (s *Store) GetRangeDebugInfo(ctx context.Context, req *rfpb.GetRangeDebugInfoRequest) (*rfpb.GetRangeDebugInfoResponse, error) {
leaderID, term, valid, _ := s.nodeHost.GetLeaderID(req.GetRangeId())
lastReplicaIDKey := keys.MakeKey(constants.LastReplicaIDKeyPrefix, []byte(fmt.Sprintf("%d", req.GetRangeId())))
lastReplicaID, err := s.sender.Increment(ctx, lastReplicaIDKey, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

after my change, i think we can now call direct read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed it to use direct read and verified that it works locally.

@vanja-p vanja-p marked this pull request as ready for review February 26, 2026 21:19
@vanja-p vanja-p requested a review from luluz66 February 26, 2026 21:19
@vanja-p vanja-p merged commit 69caea2 into master Feb 26, 2026
13 checks passed
@vanja-p vanja-p deleted the vanja-lastreplicaid branch February 26, 2026 21:42
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