Skip to content

Fix an overflow in is_staleness_acceptable#30286

Open
ali-a-a wants to merge 1 commit intoyugabyte:masterfrom
ali-a-a:fix-staleness-ms-overflow
Open

Fix an overflow in is_staleness_acceptable#30286
ali-a-a wants to merge 1 commit intoyugabyte:masterfrom
ali-a-a:fix-staleness-ms-overflow

Conversation

@ali-a-a
Copy link
Copy Markdown
Contributor

@ali-a-a ali-a-a commented Feb 11, 2026

Resolves #15011.

Right now, the maximum value for yb_follower_read_staleness_ms is set to INT_MAX (source), and the current code overflows when it gets multiplied by 1000 in is_staleness_acceptable. This PR fixes this problem by casting it into int64_t while doing the comparison.

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.

[Bug] Allow yb_follower_read_staleness_ms higher than 35 minutes (2147484 seconds)

1 participant