[java-firestore] `ServerSideTransaction.execute` ignores `PipelineExecuteOptions` argument

Đang mở
#13,094 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@MarkDuckworth đang làm issue này rồi.

Từ ngày 17/4/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

api: firestore

Description:

When executing a pipeline within a transaction, the ServerSideTransaction.execute method that accepts a PipelineExecuteOptions parameter completely ignores it and instantiates an empty options object instead.

Steps to Reproduce / Code Snippet:
In google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransaction.java:

  @Nonnull
  @Override
  public ApiFuture<Pipeline.Snapshot> execute(
      @Nonnull Pipeline pipeline, @Nonnull PipelineExecuteOptions options) {
    try (TraceUtil.Scope ignored = transactionTraceContext.makeCurrent()) {
      // BUG: ignores the 'options' parameter entirely
      return pipeline.execute(new PipelineExecuteOptions(), transactionId, null);
    }
  }

Because of this, any custom options explicitly provided during transaction.execute(pipeline, options) get dropped before the underlying gRPC ExecutePipelineRequest is dispatched.

Expected Behavior:
The method should propagate the correctly populated options object provided in the method signature:

  @Nonnull
  @Override
  public ApiFuture<Pipeline.Snapshot> execute(
      @Nonnull Pipeline pipeline, @Nonnull PipelineExecuteOptions options) {
    try (TraceUtil.Scope ignored = transactionTraceContext.makeCurrent()) {
      return pipeline.execute(options, transactionId, null);
    }
  }

Impact:
Integration tests like ITPipelineTest.testPipelineInTransactionsWithOptions end up inadvertently testing with empty options because instances like new PipelineExecuteOptions().with("foo", "bar") are discarded silently.

Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
2 ngày 14 giờ
Pull request đã merge (30 ngày)
192

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của googleapis/google-cloud-java

Tất cả issue của googleapis/google-cloud-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.