Skip to content

Commit

Permalink
ver update assume no overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjit-bhat committed Nov 21, 2024
1 parent 4403fb0 commit cb7b985
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kt/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ func (c *Client) Put(pk []byte) (uint64, *ClientErr) {
}
c.seenDigs[dig.Epoch] = dig
c.nextEpoch = dig.Epoch + 1
c.nextVer += 1
// this client controls nextVer, so no need to check for overflow.
c.nextVer = std.SumAssumeNoOverflow(c.nextVer, 1)
return dig.Epoch, &ClientErr{Err: false}
}

Expand Down

0 comments on commit cb7b985

Please sign in to comment.