Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread.sleep is one 1000 times too fast #874

Closed
olavloite opened this issue Feb 16, 2021 · 2 comments · Fixed by #885
Closed

Thread.sleep is one 1000 times too fast #874

olavloite opened this issue Feb 16, 2021 · 2 comments · Fixed by #885
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner API. documentation Improvements or additions to documentation priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. semver: patch A minor bug fix or small change. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@olavloite
Copy link
Collaborator

The example usage for TransactionManager contains an error in the retry part: The returned timeout is already in milliseconds, but the example divides it by 1000 before passing it to Thread.sleep.

@olavloite olavloite added the documentation Improvements or additions to documentation label Feb 16, 2021
@olavloite olavloite self-assigned this Feb 16, 2021
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Feb 16, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Feb 17, 2021
@elharo elharo added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. semver: patch A minor bug fix or small change. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Feb 17, 2021
@elharo
Copy link
Contributor

elharo commented Feb 17, 2021

Moved this to P1 since it's not just in the docs or the tests.

@elharo elharo changed the title Documentation for TransactionManager contains an error Thread.sleep is a 1000 times too fast Feb 17, 2021
@elharo elharo changed the title Thread.sleep is a 1000 times too fast Thread.sleep is one 1000 times too fast Feb 17, 2021
@olavloite
Copy link
Collaborator Author

olavloite commented Feb 17, 2021

Moved this to P1 since it's not just in the docs or the tests.

For clarity and the release notes:
The call that used the wrong value that is not in documentation or tests, is only for the JDBC driver. So the actual bug (other than wrong documentation) does not affect the client library, but the JDBC driver.

gcf-merge-on-green bot pushed a commit that referenced this issue Feb 19, 2021
… retry loops (#885)

Both the documentation for `TransactionManager` as well as some internal retry loops wrongly used `SpannerException#getRetryDelayInMillis() / 1000` as input for `Thread.sleep(long)`. The retry delay is already in milliseconds and should not be modified.

Fixes #874
ansh0l pushed a commit to ansh0l/java-spanner that referenced this issue Nov 10, 2022
This is an auto-generated regeneration of the .pb.go files by
cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genbot will
update the corresponding PR to depend on the newer version of go-genproto, and
assign reviewers. Whilst this or any regen PR is open in go-genproto, genbot
will not create any more regeneration PRs. If all regen PRs are closed,
gapicgen will create a new set of regeneration PRs once per night.

If you have been assigned to review this PR, please:

- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship. That will prompt
genbot to assign reviewers to the google-cloud-go PR.

Corresponding google-cloud-go PR: googleapis/google-cloud-go#6482

Changes:

feat(monitoring/apiv3): Added support for evaluating missing data in AlertPolicy
  PiperOrigin-RevId: 465650583
  Source-Link: googleapis/googleapis@9f7c0ff

feat: Publish cloudsetup.googleapis.com/complete_deployment log stream payload proto
  PiperOrigin-RevId: 465593764
  Source-Link: googleapis/googleapis@f91fc46

chore: regenerate API index

  Source-Link: googleapis/googleapis@61614d4

feat(analytics/admin): add `RunAccessReport` method to the Admin API v1alpha
  PiperOrigin-RevId: 465589484
  Source-Link: googleapis/googleapis@80bf613

chore: regenerate API index

  Source-Link: googleapis/googleapis@45b3409

feat(analytics/admin): add `GetAudience`, 'ListAudience', 'CreateAudience', 'UpdateAudience', 'ArchiveAudience' methods to the Admin API v1alpha feat: add `GetAttributionSettings`, `UpdateAttributionSettings` methods to the Admin API v1alpha
  PiperOrigin-RevId: 465469599
  Source-Link: googleapis/googleapis@2f00b9a
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this issue Nov 17, 2022
…cies to v2.12.0 (googleapis#874)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.10.0` -> `2.12.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/compatibility-slim/2.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/confidence-slim/2.10.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-shared-dependencies</summary>

### [`v2.12.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#&#8203;2120-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2110v2120-2022-05-19)

[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.11.0...v2.12.0)

##### Features

-   add build scripts for native image testing in Java 17 ([#&#8203;1440](https://togithub.com/googleapis/java-shared-dependencies/issues/1440)) ([#&#8203;697](https://togithub.com/googleapis/java-shared-dependencies/issues/697)) ([f10ec4e](https://togithub.com/googleapis/java-shared-dependencies/commit/f10ec4e664d8fde868effe366b7182a5fad08dd0))

##### Dependencies

-   update gax.version to v2.18.1 ([#&#8203;695](https://togithub.com/googleapis/java-shared-dependencies/issues/695)) ([09bc61c](https://togithub.com/googleapis/java-shared-dependencies/commit/09bc61c9152a99bfe87554a07324f15ae6217d6e))
-   update google.core.version to v2.7.1 ([#&#8203;698](https://togithub.com/googleapis/java-shared-dependencies/issues/698)) ([43de259](https://togithub.com/googleapis/java-shared-dependencies/commit/43de2593f1a6e8fa5e34799364ab683246ddd449))

### [`v2.11.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#&#8203;2110-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2100v2110-2022-05-18)

[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.10.0...v2.11.0)

##### Features

-   next release from main branch is 2.11.0 ([#&#8203;674](https://togithub.com/googleapis/java-shared-dependencies/issues/674)) ([611e3b7](https://togithub.com/googleapis/java-shared-dependencies/commit/611e3b7c50108a71efc94415166b85d2bf8647e5))

##### Dependencies

-   update dependency com.fasterxml.jackson:jackson-bom to v2.13.3 ([#&#8203;689](https://togithub.com/googleapis/java-shared-dependencies/issues/689)) ([03897e3](https://togithub.com/googleapis/java-shared-dependencies/commit/03897e30a71f8f1aa37233da2433ee5afccc1d61))
-   update dependency com.google.api-client:google-api-client-bom to v1.34.1 ([#&#8203;685](https://togithub.com/googleapis/java-shared-dependencies/issues/685)) ([9bc0557](https://togithub.com/googleapis/java-shared-dependencies/commit/9bc0557d8ce2f3d8dc7c8ffafdd36fd4c03e2df5))
-   update dependency com.google.api:api-common to v2.2.0 ([#&#8203;690](https://togithub.com/googleapis/java-shared-dependencies/issues/690)) ([47a8736](https://togithub.com/googleapis/java-shared-dependencies/commit/47a87365e51f73132b15b054d85f8c9baa8e89f6))
-   update dependency com.google.auth:google-auth-library-bom to v1.7.0 ([#&#8203;691](https://togithub.com/googleapis/java-shared-dependencies/issues/691)) ([ec6aab7](https://togithub.com/googleapis/java-shared-dependencies/commit/ec6aab72eaed43574efe47a696bba6a612f161bb))
-   update dependency com.google.errorprone:error_prone_annotations to v2.13.1 ([#&#8203;672](https://togithub.com/googleapis/java-shared-dependencies/issues/672)) ([8c7e530](https://togithub.com/googleapis/java-shared-dependencies/commit/8c7e530d3c7170b2fb76cc27a05164524ba4e00b))
-   update dependency com.google.http-client:google-http-client-bom to v1.41.8 ([#&#8203;684](https://togithub.com/googleapis/java-shared-dependencies/issues/684)) ([1305356](https://togithub.com/googleapis/java-shared-dependencies/commit/1305356775247dbb641b60654ac56da43513088e))
-   update dependency com.google.protobuf:protobuf-bom to v3.20.1 ([#&#8203;678](https://togithub.com/googleapis/java-shared-dependencies/issues/678)) ([3e6d4a1](https://togithub.com/googleapis/java-shared-dependencies/commit/3e6d4a1a8e5d45723071a62c99bb1ab87d2b2b84))
-   update dependency io.grpc:grpc-bom to v1.46.0 ([#&#8203;680](https://togithub.com/googleapis/java-shared-dependencies/issues/680)) ([b8a052b](https://togithub.com/googleapis/java-shared-dependencies/commit/b8a052b75a1bc2703500b4f31c5c6dac887ab8be))
-   update dependency org.checkerframework:checker-qual to v3.22.0 ([#&#8203;683](https://togithub.com/googleapis/java-shared-dependencies/issues/683)) ([b0a30cd](https://togithub.com/googleapis/java-shared-dependencies/commit/b0a30cdecae8dcfb3a6d36e3f194c39a0086673e))
-   update gax.version to v2.17.0 ([#&#8203;687](https://togithub.com/googleapis/java-shared-dependencies/issues/687)) ([e0e89ea](https://togithub.com/googleapis/java-shared-dependencies/commit/e0e89eade481effc723c9c7261f2ebf4e5883621))
-   update gax.version to v2.18.0 ([#&#8203;692](https://togithub.com/googleapis/java-shared-dependencies/issues/692)) ([9536612](https://togithub.com/googleapis/java-shared-dependencies/commit/9536612c77af1e4d912c5b63515ea6f750e53810))
-   update google.core.version to v2.6.1 ([#&#8203;671](https://togithub.com/googleapis/java-shared-dependencies/issues/671)) ([e3d1aeb](https://togithub.com/googleapis/java-shared-dependencies/commit/e3d1aebed31f8e91109d5865afd9525ac3595c90))
-   update google.core.version to v2.7.0 ([#&#8203;693](https://togithub.com/googleapis/java-shared-dependencies/issues/693)) ([2171677](https://togithub.com/googleapis/java-shared-dependencies/commit/2171677e16190de9f37dc16c924d829ea8ccd86c))
-   update iam.version to v1.3.2 ([#&#8203;673](https://togithub.com/googleapis/java-shared-dependencies/issues/673)) ([9882baa](https://togithub.com/googleapis/java-shared-dependencies/commit/9882baa3ecc8d7584788af1916f0d8c5ec670b5c))
-   update iam.version to v1.3.3 ([#&#8203;679](https://togithub.com/googleapis/java-shared-dependencies/issues/679)) ([9fe34c8](https://togithub.com/googleapis/java-shared-dependencies/commit/9fe34c89eabed5eeebad986bffeeeb64dbbc38c1))
-   update iam.version to v1.3.4 ([#&#8203;686](https://togithub.com/googleapis/java-shared-dependencies/issues/686)) ([4e95b3a](https://togithub.com/googleapis/java-shared-dependencies/commit/4e95b3a1d4302812338c220df316391c19ef7473))
-   update opencensus.version to v0.31.1 ([#&#8203;682](https://togithub.com/googleapis/java-shared-dependencies/issues/682)) ([5d25746](https://togithub.com/googleapis/java-shared-dependencies/commit/5d25746bc6c9329b240204cbe7b83e2fee4c6cb3))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc).
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this issue Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [2.7.0](googleapis/java-spanner-jdbc@v2.6.4...v2.7.0) (2022-05-24)


### Features

* add build scripts for native image testing in Java 17 ([googleapis#1440](googleapis/java-spanner-jdbc#1440)) ([googleapis#875](googleapis/java-spanner-jdbc#875)) ([600e401](googleapis/java-spanner-jdbc@600e401))


### Dependencies

* bump Spanner to 6.23.3 ([googleapis#862](googleapis/java-spanner-jdbc#862)) ([b7b8efa](googleapis/java-spanner-jdbc@b7b8efa)), closes [googleapis#788](googleapis/java-spanner-jdbc#788)
* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 ([googleapis#874](googleapis/java-spanner-jdbc#874)) ([d403f54](googleapis/java-spanner-jdbc@d403f54))
* update opencensus.version to v0.31.1 ([googleapis#865](googleapis/java-spanner-jdbc#865)) ([61ba9be](googleapis/java-spanner-jdbc@61ba9be))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. documentation Improvements or additions to documentation priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. semver: patch A minor bug fix or small change. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
3 participants