Skip to content

Commit 7e3eab2

Browse files
Increase async cache stale period from 3 to 5 minutes. (#608)
## Changes Increases the default async cache stale period from 3 minutes to 5 minutes. ## Rationale The 5-minute stale period covers the maximum monthly downtime allowed by a 99.99% uptime SLA (~4.38 minutes). This ensures that even during the worst-case downtime scenario, the cache can continue serving stale tokens while waiting for the auth service to recover (assuming continuous traffic). Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent 9039afb commit 7e3eab2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### New Features and Improvements
66

7+
* Increase async cache stale period from 3 to 5 minutes to cover the maximum monthly downtime of a 99.99% uptime SLA.
8+
79
### Bug Fixes
810

911
### Security Vulnerabilities

databricks-sdk-java/src/main/java/com/databricks/sdk/core/oauth/CachedTokenSource.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ private enum TokenState {
3030
}
3131

3232
private static final Logger logger = LoggerFactory.getLogger(CachedTokenSource.class);
33-
// Default duration before expiry to consider a token as 'stale'.
34-
private static final Duration DEFAULT_STALE_DURATION = Duration.ofMinutes(3);
33+
// Default duration before expiry to consider a token as 'stale'. This value is chosen to cover
34+
// the maximum monthly downtime allowed by a 99.99% uptime SLA (~4.38 minutes).
35+
private static final Duration DEFAULT_STALE_DURATION = Duration.ofMinutes(5);
3536
// Default additional buffer before expiry to consider a token as expired.
3637
// This is 40 seconds by default since Azure Databricks rejects tokens that are within 30 seconds
3738
// of expiry.

0 commit comments

Comments
 (0)