Skip to content

fix(spanner): Fix the start timestamp > end timestamp issue for change stream initial query. - #13885

Merged
rahul2393 merged 1 commit into
googleapis:mainfrom
jiangzzhu:main
Jul 30, 2026
Merged

fix(spanner): Fix the start timestamp > end timestamp issue for change stream initial query.#13885
rahul2393 merged 1 commit into
googleapis:mainfrom
jiangzzhu:main

Conversation

@jiangzzhu

Copy link
Copy Markdown
Contributor

No description provided.

@jiangzzhu
jiangzzhu requested review from a team as code owners July 24, 2026 04:44

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates executeExecuteChangeStreamQuery in CloudClientExecutor.java to use a new helper method timestampFromMicrosOrNanos for generating start and end timestamps, ensuring the end timestamp is not before the start timestamp. Feedback was provided regarding the use of System.nanoTime() % 1000 in the helper method, which can return negative values and alter the microsecond portion of the timestamp; using ThreadLocalRandom.current().nextInt(1000) was suggested as a safer and more appropriate alternative.

@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 24, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 24, 2026
@jiangzzhu

Copy link
Copy Markdown
Contributor Author

Hi @rahul2393 and @sakthivelmanii , could you merge this PR? Thanks!

@rahul2393
rahul2393 enabled auto-merge (squash) July 30, 2026 02:35
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 30, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 30, 2026
@rahul2393
rahul2393 merged commit 3f2c7dd into googleapis:main Jul 30, 2026
210 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants