Skip to content

Commit

Permalink
Initialize delta.GroupChecksums if nil
Browse files Browse the repository at this point in the history
delta.GroupChecksums is nil at this point in the code, so copying keys to this map causes the code to panic
  • Loading branch information
rahulgurnani committed Jul 15, 2020
1 parent 3c71018 commit 4f91551
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 @@ -955,6 +955,9 @@ func (g *groupi) processOracleDeltaStream() {
batch++
delta.Txns = append(delta.Txns, more.Txns...)
delta.MaxAssigned = x.Max(delta.MaxAssigned, more.MaxAssigned)
if delta.GroupChecksums == nil {
delta.GroupChecksums = make(map[uint32]uint64)
}
for gid, checksum := range more.GroupChecksums {
delta.GroupChecksums[gid] = checksum
}
Expand Down

0 comments on commit 4f91551

Please sign in to comment.