Skip to content

Commit

Permalink
fix(storage): remove duplicate routing header (#11534)
Browse files Browse the repository at this point in the history
Appendable writes were duplicating the x-goog-request-params header which caused issues server side. Remove this.

For append writes we need to include appendable=true and an optional routing token in this header.
  • Loading branch information
tritone authored Jan 30, 2025
1 parent cac52f7 commit 8eeb59c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion storage/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,14 @@ func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storage
return err
}

err = run(bucketContext(gw.ctx, gw.bucket), uploadBuff, gw.settings.retry, s.idempotent)
// Add routing headers to the context metadata for single-shot and resumable
// writes. Append writes need to set this at a lower level to pass the routing
// token.
bctx := gw.ctx
if !gw.append {
bctx = bucketContext(bctx, gw.bucket)
}
err = run(bctx, uploadBuff, gw.settings.retry, s.idempotent)
if err != nil {
return err
}
Expand Down

0 comments on commit 8eeb59c

Please sign in to comment.