Skip to content

Commit

Permalink
Lock the correct lock on wal replay (#590)
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
joe-elliott authored Mar 13, 2021
1 parent 3619c63 commit 0712134
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ingester/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ func (i *instance) Push(ctx context.Context, req *tempopb.PushRequest) error {

// PushBytes is used by the wal replay code and so it can push directly into the head block with 0 shenanigans
func (i *instance) PushBytes(ctx context.Context, id []byte, object []byte) error {
i.tracesMtx.Lock()
defer i.tracesMtx.Unlock()
i.blocksMtx.Lock()
defer i.blocksMtx.Unlock()

return i.headBlock.Write(id, object)
}
Expand Down

0 comments on commit 0712134

Please sign in to comment.