Fix double-application of 30s client grace period (v8.0.1)#474
Merged
tanmaya-panda1 merged 2 commits intomasterfrom Apr 29, 2026
Merged
Fix double-application of 30s client grace period (v8.0.1)#474tanmaya-panda1 merged 2 commits intomasterfrom
tanmaya-panda1 merged 2 commits intomasterfrom
Conversation
PR #426 (v7.0.6) added a 30-second client grace period in ClientImpl.determineTimeout. However, BaseClient.getContextTimeout was already adding the same 30-second buffer (EXTRA_TIMEOUT_FOR_CLIENT_SIDE) when constructing the HTTP request context, so every request used an effective HTTP-client timeout of serverTimeout + 60s instead of the intended serverTimeout + 30s. Removes the redundant grace from determineTimeout. The single 30s grace in BaseClient.getContextTimeout is preserved (pre-7.0.6 behavior). The servertimeout header sent to the service is unchanged. Adds ClientImplTimeoutTest pinning determineTimeout's return to the raw timeout (no grace at this layer) so the regression cannot be silently reintroduced. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes a regression where the client-side HTTP timeout buffer (“30s grace”) was being applied twice, restoring the intended effective timeout behavior across requests and preventing reintroduction via a regression test.
Changes:
- Remove the extra 30s grace period addition from
ClientImpl.determineTimeout(grace remains applied once inBaseClient.getContextTimeout). - Add a regression test that pins
determineTimeoutto return the raw (non-graced) timeout and verifies theservertimeoutoption value. - Bump project revision to
8.0.1and document the fix in the changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| quickstart/pom.xml | Bumps quickstart artifact revision to 8.0.1 to match the release. |
| pom.xml | Bumps root project revision to 8.0.1. |
| data/src/test/java/com/microsoft/azure/kusto/data/ClientImplTimeoutTest.java | Adds regression coverage ensuring determineTimeout returns raw values and doesn’t mutate servertimeout with grace. |
| data/src/main/java/com/microsoft/azure/kusto/data/ClientImpl.java | Removes redundant grace addition and exposes determineTimeout at package scope for testing. |
| CHANGELOG.md | Documents the 8.0.1 fix for the double-applied grace period. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #426 (v7.0.6) added a 30-second client grace period in ClientImpl.determineTimeout. However, BaseClient.getContextTimeout was already adding the same 30-second buffer (EXTRA_TIMEOUT_FOR_CLIENT_SIDE) when constructing the HTTP request context, so every request used an effective HTTP-client timeout of serverTimeout + 60s instead of the intended serverTimeout + 30s.
Removes the redundant grace from determineTimeout. The single 30s grace in BaseClient.getContextTimeout is preserved (pre-7.0.6 behavior). The servertimeout header sent to the service is unchanged.
Adds ClientImplTimeoutTest pinning determineTimeout's return to the raw timeout (no grace at this layer) so the regression cannot be silently reintroduced.
Added
Changed
Fixed