Skip to content

Commit

Permalink
Merge #73020
Browse files Browse the repository at this point in the history
73020: kvserver: fix envvar in closed timestamp regression error hint r=tbg a=erikgrinaker

When a closed timestamp is found to regress, an assertion error is
returned containing this hint:

```
This assertion will fire again on restart; to ignore run with env var COCKROACH_RAFT_CLOSEDTS_ASSERTIONS_ENABLED=true
```

However, this is incorrect: the env var must be set to `false`, not
`true`, to disable the assertion. This patch fixes that, and adds a
missing newline as well.

Resolves #72812.

Release note: None

Co-authored-by: Erik Grinaker <[email protected]>
  • Loading branch information
craig[bot] and erikgrinaker committed Nov 22, 2021
2 parents cfb0bf3 + ffe4fd1 commit c28d736
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/replica_application_state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ func (b *replicaAppBatch) assertNoCmdClosedTimestampRegression(
return errors.AssertionFailedf(
"raft closed timestamp regression in cmd: %x (term: %d, index: %d); batch state: %s, command: %s, lease: %s, req: %s, applying at LAI: %d.\n"+
"Closed timestamp was set by req: %s under lease: %s; applied at LAI: %d. Batch idx: %d.\n"+
"This assertion will fire again on restart; to ignore run with env var COCKROACH_RAFT_CLOSEDTS_ASSERTIONS_ENABLED=true"+
"This assertion will fire again on restart; to ignore run with env var COCKROACH_RAFT_CLOSEDTS_ASSERTIONS_ENABLED=false\n"+
"Raft log tail:\n%s",
cmd.idKey, cmd.ent.Term, cmd.ent.Index, existingClosed, newClosed, b.state.Lease, req, cmd.leaseIndex,
prevReq, b.closedTimestampSetter.lease, b.closedTimestampSetter.leaseIdx, b.entries,
Expand Down

0 comments on commit c28d736

Please sign in to comment.