Skip to content

Commit

Permalink
Update group checksums when combining multiple deltas. (#5394)
Browse files Browse the repository at this point in the history
The function processing the oracle delta stream combines multiple deltas
into one to reduce the number of proposal. However, the group checksums
were not being updated, causing some group checksums update to be lost.

gRPC guarantees that the ordering of the deltas coming from the stream
so overwriting the group checksums is safe.

Tested by following the steps in #5368.

Fixes #5368
  • Loading branch information
martinmr committed May 8, 2020
1 parent d3ed307 commit 8844771
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions worker/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,9 @@ func (g *groupi) processOracleDeltaStream() {
batch++
delta.Txns = append(delta.Txns, more.Txns...)
delta.MaxAssigned = x.Max(delta.MaxAssigned, more.MaxAssigned)
for gid, checksum := range more.GroupChecksums {
delta.GroupChecksums[gid] = checksum
}
default:
break SLURP
}
Expand Down

0 comments on commit 8844771

Please sign in to comment.