Skip to content

Commit

Permalink
fix(bigquery/storage/managedwriter): fix flowcontroller double-release (
Browse files Browse the repository at this point in the history
#4555)

Stress testing caught this one:  responsibility for releasing flow
controlled resources is in markDone of pending write, and the reference
in the recvProcessor was over-freeing resources.

Towards: #4366
  • Loading branch information
shollyman committed Aug 5, 2021
1 parent 1606a69 commit 67facd9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion bigquery/storage/managedwriter/managed_stream.go
Expand Up @@ -358,7 +358,6 @@ func recvProcessor(ctx context.Context, arc storagepb.BigQueryWrite_AppendRowsCl
recordStat(ctx, AppendResponses, 1)

if status := resp.GetError(); status != nil {
fc.release(nextWrite.reqSize)
nextWrite.markDone(NoStreamOffset, grpcstatus.ErrorProto(status), fc)
continue
}
Expand Down

0 comments on commit 67facd9

Please sign in to comment.