kvserver: use messages on NotLeaseholderErrors everywhere#56334
kvserver: use messages on NotLeaseholderErrors everywhere#56334craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
nvb
left a comment
There was a problem hiding this comment.
Reviewed 4 of 4 files at r1.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @andreimatei)
pkg/kv/kvserver/replica_application_result.go, line 217 at r1 (raw file):
r.store.StoreID(), r.mu.state.Desc, "request's timestamp below closed timestamp",
Aren't we setting this two lines down? Maybe just move that message (which is a little better) in here?
pkg/kv/kvserver/replica_range_lease.go, line 1101 at r1 (raw file):
log.VErrEventf(ctx, 2, "lease acquisition failed: %s", ctx.Err()) return roachpb.NewError(newNotLeaseHolderError(nil, r.store.StoreID(), r.Desc(), "lease acquisition canceled"))
maybe add "because context canceled" to differentiate with next message.
pkg/kv/kvserver/replica_range_lease.go, line 1105 at r1 (raw file):
llHandle.Cancel() return roachpb.NewError(newNotLeaseHolderError(nil, r.store.StoreID(), r.Desc(), "lease acquisition cancled because node is stopping"))
canceled
NLHE permits custom messages in it, but the field was rarely used. This patch makes every instance where we instantiate the error provide a message, since this error comes from a wide variety of conditions. Release note: None
af6a81f to
3db3781
Compare
andreimatei
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained
pkg/kv/kvserver/replica_application_result.go, line 217 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Aren't we setting this two lines down? Maybe just move that message (which is a little better) in here?
done
pkg/kv/kvserver/replica_range_lease.go, line 1101 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
maybe add "because context canceled" to differentiate with next message.
done
pkg/kv/kvserver/replica_range_lease.go, line 1105 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
canceled
done
andreimatei
left a comment
There was a problem hiding this comment.
bors r+
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)
|
This PR was included in a batch that was canceled, it will be automatically retried |
|
Build succeeded: |
NLHE permits custom messages in it, but the field was rarely used. This
patch makes every instance where we instantiate the error provide a
message, since this error comes from a wide variety of conditions.
Release note: None