Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvserver: deadlock when getting replica.Desc while under lock #66760

Merged
merged 1 commit into from
Jun 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/kv/kvserver/replica_protected_timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (r *Replica) protectedTimestampRecordCurrentlyApplies(
if args.Protected.LessEq(*r.mu.state.GCThreshold) {
gcReason := fmt.Sprintf("protected ts: %s is less than equal to the GCThreshold: %s for the"+
" range %s - %s", args.Protected.String(), r.mu.state.GCThreshold.String(),
r.Desc().StartKey.String(), r.Desc().EndKey.String())
desc.StartKey.String(), desc.EndKey.String())
return false, false, gcReason, nil
}
if args.RecordAliveAt.Less(ls.Lease.Start.ToTimestamp()) {
Expand All @@ -208,7 +208,7 @@ func (r *Replica) protectedTimestampRecordCurrentlyApplies(
gcReason := fmt.Sprintf(
"protected ts: %s is less than the pending GCThreshold: %s for the range %s - %s",
args.Protected.String(), r.protectedTimestampMu.pendingGCThreshold.String(),
r.Desc().StartKey.String(), r.Desc().EndKey.String())
desc.StartKey.String(), desc.EndKey.String())
return false, false, gcReason, nil
}

Expand Down