cockroachdb / cockroachdb/cockroach

possible divide by zero issue in a gc log entry

Open
#115,711 1 comment 0 reactions 0 assignees View on GitHub
C-bug O-23.2-scale-testing O-testcluster P-3 T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Per [this](https://cockroachlabs.slack.com/archives/C05VAJ5H3QS/p1701878327988459) thread, we seem to have a divide by zero or similar issue when printing the score to the logs as shown below:

```
I231206 02:08:24.432828 9477119 kv/kvserver/mvcc_gc_queue.go:827 ⋮ [T1,Vsystem,n8,mvccGC,s8,r137131/1:‹/Table/106/25/22{1740…-4050…}›] 1885 GC still needed following GC, recomputing MVCC stats
I231206 02:08:24.432856 9477119 kv/kvserver/mvcc_gc_queue.go:828 ⋮ [T1,Vsystem,n8,mvccGC,s8,r137131/1:‹/Table/106/25/22{1740…-4050…}›] 1886 old score ‹queue=false with 0.99/fuzz(1.00)=1.00=valScaleScore(1.00)*deadFrac(1.00)+intentScore(0.00)›
I231206 02:08:24.432856 9477119 kv/kvserver/mvcc_gc_queue.go:828 ⋮ [T1,Vsystem,n8,mvccGC,s8,r137131/1:‹/Table/106/25/22{1740…-4050…}›] 1886 +‹likely last GC: never, 285 MiB non-live, curr. age 3.9 TiB*s, min exp. reduction: 0 B*s›
I231206 02:08:24.432856 9477119 kv/kvserver/mvcc_gc_queue.go:828 ⋮ [T1,Vsystem,n8,mvccGC,s8,r137131/1:‹/Table/106/25/22{1740…-4050…}›] 1886 +‹hint: {1701814039.200905202,0 1701814039.200905202,0 0,0}›
I231206 02:08:24.432886 9477119 kv/kvserver/mvcc_gc_queue.go:829 ⋮ [T1,Vsystem,n8,mvccGC,s8,r137131/1:‹/Table/106/25/22{1740…-4050…}›] 1887 new score ‹queue=true with 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00/fuzz(1.00)=+Inf=valScaleScore(1.00)*deadFrac(1.00)+intentScore(0.00)›
I231206 02:08:24.432886 9477119 kv/kvserver/mvcc_gc_queue.go:829 ⋮ [T1,Vsystem,n8,mvccGC,s8,r137131/1:‹/Table/106/25/22{1740…-4050…}›] 1887 +‹likely last GC: never, 285 MiB non-live, curr. age 3.9 TiB*s, min exp. reduction: 18 GiB*s›
I231206 02:08:24.432886 9477119 kv/kvserver/mvcc_gc_queue.go:829 ⋮ [T1,Vsystem,n8,mvccGC,s8,r137131/1:‹/Table/106/25/22{1740…-4050…}›] 1887 +‹hint: {1701814039.200905202,0 1701814039.200905202,0 0,0}›
```

Jira issue: CRDB-34164

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.