Skip to content

Fix double-application of 30s client grace period (v8.0.1)#474

Merged
tanmaya-panda1 merged 2 commits intomasterfrom
users/tanmayapanda/fix-double-grace-period-v8
Apr 29, 2026
Merged

Fix double-application of 30s client grace period (v8.0.1)#474
tanmaya-panda1 merged 2 commits intomasterfrom
users/tanmayapanda/fix-double-grace-period-v8

Conversation

@tanmaya-panda1
Copy link
Copy Markdown
Collaborator

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

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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in BaseClient.getContextTimeout).
  • Add a regression test that pins determineTimeout to return the raw (non-graced) timeout and verifies the servertimeout option value.
  • Bump project revision to 8.0.1 and 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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Test Results

537 tests  +6   528 ✅ +6   8m 4s ⏱️ +5s
 32 suites +1     9 💤 ±0 
 32 files   +1     0 ❌ ±0 

Results for commit c338b38. ± Comparison against base commit 8934755.

♻️ This comment has been updated with latest results.

@asaharn asaharn assigned asaharn and unassigned asaharn Apr 29, 2026
@asaharn asaharn self-requested a review April 29, 2026 09:45
@tanmaya-panda1 tanmaya-panda1 merged commit 5b2e415 into master Apr 29, 2026
7 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.

3 participants