Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
51079: kv/gc: don't continue iterating and spamming logs when deadline exceeded r=nvanbenschoten a=nvanbenschoten Before this change, we'd see logs like: ``` W200706 11:23:10.682177 15143568003 kv/kvserver/gc/gc.go:337 [n118,gc,s118,r6153/1:/Table/57/1/"user1216{19…-44…}] failed to GC a batch of keys: result is ambiguous (context deadline exceeded) W200706 11:23:10.685251 15143568003 kv/kvserver/gc/gc.go:337 [n118,gc,s118,r6153/1:/Table/57/1/"user1216{19…-44…}] failed to GC a batch of keys: aborted during Replica.Send: context deadline exceeded W200706 11:23:10.688667 15143568003 kv/kvserver/gc/gc.go:337 [n118,gc,s118,r6153/1:/Table/57/1/"user1216{19…-44…}] failed to GC a batch of keys: aborted during Replica.Send: context deadline exceeded W200706 11:23:10.691760 15143568003 kv/kvserver/gc/gc.go:337 [n118,gc,s118,r6153/1:/Table/57/1/"user1216{19…-44…}] failed to GC a batch of keys: aborted during Replica.Send: context deadline exceeded ... ``` if a GC attempt hit its deadline. Now, we terminate iteration early and do our best to stop running GC once the context is canceled / exceeding its deadline. Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information