GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Storage batch setEventBasedHold=false does not work · Issue #2902 · googleapis/java-storage

This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Storage batch setEventBasedHold=false does not work #2902

Copy link
Copy link
Closed
#2905
Closed
Storage batch setEventBasedHold=false does not work#2902
#2905
Copy link
Labels
api: storageIssues related to the googleapis/java-storage API.

Description

@sfc-gh-mwnukowski
sfc-gh-mwnukowski
opened on Jan 29, 2025
Issue body actions

Environment details

  1. OS type and version: Centos 7 5.15 aarch64
  2. Java version: 11
  3. version(s):
  • com.google.cloud libraries-bom: 26.53.0
  • com.google.api-client google-api-client: 2.7.2
  • com.google.apis google-api-services-storage: v1-rev20241206-2.0.0
  • com.google.cloud google-cloud-storage 2.48.0

Code example

 public static void batchSetHold(Storage storage, String bucketName, List<String> names) {
    List<BlobInfo> inputBlobs = new ArrayList<>();
    for (String filename : names) {
      inputBlobs.add(
          BlobInfo.newBuilder(BlobId.of(bucketName, filename)).setEventBasedHold(true).build());
    }
    var result1 = storage.update(inputBlobs);
    if (result1.get(0).getEventBasedHold() == true) {
      LOGGER.info("expected");
    }
    inputBlobs = new ArrayList<>();
    for (String filename : names) {
      inputBlobs.add(
          BlobInfo.newBuilder(BlobId.of(bucketName, filename)).setEventBasedHold(false).build());
    }
    var result2 = storage.update(inputBlobs);
    if (result2.get(0).getEventBasedHold() == true) {
      LOGGER.error("Should not happen");
    }
 }

Any additional information below

Seconds call to update does not result in any update to blob active holds. Despite setting setEventBasedHold(false) the result is that the blob still has a hold. No exception thrown. The files still have active event hold after second call.

Seems like regression. This worked just fine with versions:

  • com.google.cloud libraries-bom: 26.49.0
  • com.google.api-client google-api-client: 2.2.0
  • com.google.apis google-api-services-storage: v1-rev20231028-2.0.0<
  • com.google.cloud google-cloud-storage 2.13.1

Activity

  1. product-auto-label
    added
    api: storageIssues related to the googleapis/java-storage API.
    on Jan 29, 2025
  2. sfc-gh-mwnukowski commented on Jan 30, 2025

    @sfc-gh-mwnukowski
    sfc-gh-mwnukowski
    on Jan 30, 2025
    ContributorAuthor
    More actions

    I enabled http request and response logging and compared between SDK versions. The most suspicious thing is that with new SDK both batches are using exactly the same x-goog-gcs-idempotency-token in the headers. Old SDK does not use x-goog-gcs-idempotency-token at all.

  3. BenWhitehead
    closed this as completedin #2905on Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storageIssues related to the googleapis/java-storage API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.