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 documentation priority: p1 semver: patch type: bug

Comments

@olavloite
Copy link
Contributor

@olavloite olavloite commented Feb 16, 2021

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 label Feb 16, 2021
@olavloite olavloite self-assigned this Feb 16, 2021
@product-auto-label product-auto-label bot added the api: spanner label Feb 16, 2021
@yoshi-automation yoshi-automation added the triage me label Feb 17, 2021
@elharo elharo added priority: p1 semver: patch type: bug and removed triage me labels Feb 17, 2021
@elharo
Copy link
Contributor

@elharo 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
Contributor Author

@olavloite 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner documentation priority: p1 semver: patch type: bug
Projects
None yet
3 participants