Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fixing retries of Storage.create#2359

Merged
garrettjonesgoogle merged 2 commits into
googleapis:mastergoogleapis/google-cloud-java:masterfrom
garrettjonesgoogle:altgarrettjonesgoogle/gcloud-java:altCopy head branch name to clipboard
Aug 18, 2017
Merged

Fixing retries of Storage.create#2359
garrettjonesgoogle merged 2 commits into
googleapis:mastergoogleapis/google-cloud-java:masterfrom
garrettjonesgoogle:altgarrettjonesgoogle/gcloud-java:altCopy head branch name to clipboard

Conversation

@garrettjonesgoogle

Copy link
Copy Markdown
Contributor
  • For Blob create(BlobInfo blobInfo, InputStream content, BlobWriteOption... options): Turning off retries and marking @Deprecated, because once the InputStream has been consumed, it can't be consumed again.
  • For Blob create(BlobInfo blobInfo, byte[] content, BlobTargetOption... options): Re-creating the InputStream on every call, so that the same data is resent to the server.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 18, 2017

@vam-google vam-google left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but maybe mark()/reset() is worth doing it.

Map<StorageRpc.Option, ?> optionsMap = optionMap(targetOptions.x(), targetOptions.y());
InputStream inputStreamParam = firstNonNull(content, new ByteArrayInputStream(EMPTY_BYTE_ARRAY));
// retries are not safe when the input is an InputStream, so we can't retry.
return Blob.fromPb(this, storageRpc.create(blobPb, inputStreamParam, optionsMap));

This comment was marked as spam.

* @return a [@code Blob} with complete information
* @throws StorageException upon failure
*/
@Deprecated

This comment was marked as spam.

This comment was marked as spam.

@nafg

nafg commented Oct 22, 2017

Copy link
Copy Markdown

So for now we're not supposed to use it and are required to either load everything into RAM or write a lot of boilerplate?

@frankyn

frankyn commented Nov 6, 2017

Copy link
Copy Markdown
Contributor

Ping @garrettjonesgoogle and @andreamlin for user feedback on this PR. Is there a plan to introduce RestartableInputStream as stated?

@garrettjonesgoogle

Copy link
Copy Markdown
Contributor Author

I have filed #2620 to track the work of introducing RestartableInputStream.

chingor13 pushed a commit that referenced this pull request Feb 20, 2026
…29.0 (#2359)

* chore(deps): update dependency com.google.cloud:libraries-bom to v26.29.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
🤖 I have created a release *beep* *boop*
---


## [2.35.0](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.34.1...v2.35.0) (2026-01-16)


### Features

* Support float4 in JDBC ([googleapis#2336](https://togithub.com/googleapis/java-spanner-jdbc/issues/2336)) ([22ca02f](https://togithub.com/googleapis/java-spanner-jdbc/commit/22ca02fa6d27a6224a1b416ca94589d4877ae339))


### Dependencies

* Update dependency com.google.api.grpc:proto-google-cloud-trace-v1 to v2.81.0 ([googleapis#2331](https://togithub.com/googleapis/java-spanner-jdbc/issues/2331)) ([4452ab7](https://togithub.com/googleapis/java-spanner-jdbc/commit/4452ab743cf9c4df3565b2efe0f5fe4769404d8b))
* Update dependency com.google.api.grpc:proto-google-cloud-trace-v1 to v2.82.0 ([googleapis#2357](https://togithub.com/googleapis/java-spanner-jdbc/issues/2357)) ([8680aeb](https://togithub.com/googleapis/java-spanner-jdbc/commit/8680aebfa69369bd94b203b28dbe9bbe9a2ccd01))
* Update dependency com.google.cloud:google-cloud-spanner to v6.106.0 ([googleapis#2351](https://togithub.com/googleapis/java-spanner-jdbc/issues/2351)) ([caa0ccc](https://togithub.com/googleapis/java-spanner-jdbc/commit/caa0ccc134a5f531750590c79291747b9833d1b4))
* Update dependency com.google.cloud:google-cloud-spanner to v6.107.0 ([googleapis#2360](https://togithub.com/googleapis/java-spanner-jdbc/issues/2360)) ([da3d74f](https://togithub.com/googleapis/java-spanner-jdbc/commit/da3d74f103fbec85421a686091730bc5edc5b27f))
* Update dependency com.google.cloud:google-cloud-spanner-bom to v6.106.0 ([googleapis#2352](https://togithub.com/googleapis/java-spanner-jdbc/issues/2352)) ([2af488c](https://togithub.com/googleapis/java-spanner-jdbc/commit/2af488c4f12b4909414b8722153ae8abc65dd2c1))
* Update dependency com.google.cloud:google-cloud-spanner-bom to v6.107.0 ([googleapis#2361](https://togithub.com/googleapis/java-spanner-jdbc/issues/2361)) ([f6f5942](https://togithub.com/googleapis/java-spanner-jdbc/commit/f6f59429ed8c8eb3e66e122901fa71bf4961274a))
* Update dependency com.google.cloud:google-cloud-trace to v2.81.0 ([googleapis#2332](https://togithub.com/googleapis/java-spanner-jdbc/issues/2332)) ([2aabda8](https://togithub.com/googleapis/java-spanner-jdbc/commit/2aabda8b2b760c42c93f80edefd615b6ad56eb63))
* Update dependency com.google.cloud:google-cloud-trace to v2.82.0 ([googleapis#2358](https://togithub.com/googleapis/java-spanner-jdbc/issues/2358)) ([b1d24e8](https://togithub.com/googleapis/java-spanner-jdbc/commit/b1d24e84e3ccb4af782f3cfc81fd0ac5aa958bb3))
* Update dependency com.google.cloud:grpc-gcp to v1.9.1 ([googleapis#2348](https://togithub.com/googleapis/java-spanner-jdbc/issues/2348)) ([3e7751b](https://togithub.com/googleapis/java-spanner-jdbc/commit/3e7751b0b762d4f44fdac784e10473025df8f553))
* Update dependency com.google.cloud:sdk-platform-java-config to v3.55.1 ([googleapis#2355](https://togithub.com/googleapis/java-spanner-jdbc/issues/2355)) ([40814f1](https://togithub.com/googleapis/java-spanner-jdbc/commit/40814f1c6686b60d23cc905665eda332fdc17a4b))
* Update dependency io.opentelemetry:opentelemetry-bom to v1.58.0 ([googleapis#2354](https://togithub.com/googleapis/java-spanner-jdbc/issues/2354)) ([da8bab0](https://togithub.com/googleapis/java-spanner-jdbc/commit/da8bab0a5b756f64a51d240eae230cb80f4aba4b))
* Update dependency net.bytebuddy:byte-buddy to v1.18.4 ([googleapis#2349](https://togithub.com/googleapis/java-spanner-jdbc/issues/2349)) ([22bdf80](https://togithub.com/googleapis/java-spanner-jdbc/commit/22bdf8092c446dab6b904f14b925eedf6d1360aa))
* Update dependency net.bytebuddy:byte-buddy-agent to v1.18.4 ([googleapis#2350](https://togithub.com/googleapis/java-spanner-jdbc/issues/2350)) ([19437f0](https://togithub.com/googleapis/java-spanner-jdbc/commit/19437f033f34c98dd35e6e2f412d9dc72cbbe503))
* Update dependency org.postgresql:postgresql to v42.7.9 ([googleapis#2359](https://togithub.com/googleapis/java-spanner-jdbc/issues/2359)) ([b35164a](https://togithub.com/googleapis/java-spanner-jdbc/commit/b35164ad6a52b2c0b90bd6920b8568dae5361701))
* Update dependency org.springframework.boot:spring-boot to v4.0.1 ([googleapis#2343](https://togithub.com/googleapis/java-spanner-jdbc/issues/2343)) ([da07b14](https://togithub.com/googleapis/java-spanner-jdbc/commit/da07b14177862052a228751efce03ca91d64cb51))
* Update dependency org.springframework.boot:spring-boot-starter-data-jdbc to v4.0.1 ([googleapis#2344](https://togithub.com/googleapis/java-spanner-jdbc/issues/2344)) ([67cfffc](https://togithub.com/googleapis/java-spanner-jdbc/commit/67cfffc558c7c089565e65ff31dd0dfcb5e9ad7c))
* Update dependency org.springframework.boot:spring-boot-starter-parent to v3.5.9 ([googleapis#2342](https://togithub.com/googleapis/java-spanner-jdbc/issues/2342)) ([441c91e](https://togithub.com/googleapis/java-spanner-jdbc/commit/441c91ed8f58f6083888a95ee4d563e5bbb1824b))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
meltsufin pushed a commit that referenced this pull request May 2, 2026
* deps: update sdk-platform-java-config to 3.60.0

* fix: correct version

---------

Co-authored-by: Blake Li <blakeli@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.