Skip to content

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

Open
jiangzzhu wants to merge 1 commit into
googleapis:mainfrom
jiangzzhu:main
Open

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

Conversation

@jiangzzhu

Copy link
Copy Markdown

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
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