You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "hreddygayam (via GitHub)" <gi...@apache.org> on 2026/10/16 04:55:20 UTC
[PR] Core: Fix AuthSessionCache to use expireAfterWrite instead of expireAfterAccess [iceberg]
hreddygayam opened a new pull request, #18536:
URL: https://github.com/apache/iceberg/pull/18536
## What
Fix `AuthSessionCache` to evict entries based on write time (`expireAfterWrite`) instead of access time (`expireAfterAccess`).
## Why
Sessions hold OAuth tokens that expire at a fixed time after they are issued. With `expireAfterAccess`, a frequently-used session would never be evicted from the cache, causing it to hold a stale token indefinitely. Switching to `expireAfterWrite` ensures sessions are always evicted after `sessionTimeout` from their creation, regardless of access patterns.
## Changes
- Switch the cache from `expireAfterAccess` to `expireAfterWrite`.
- Correct the Javadoc on both constructors, which incorrectly described the timeout as a "duration of inactivity" (`expireAfterAccess` semantics).
- Add a regression test verifying eviction is based on write time: a session accessed at `t=59min` is still evicted at `t=60min` (1-hour timeout from creation), even though access-based TTL would have reset the window to `t=119min`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core: Fix AuthSessionCache to use expireAfterWrite instead of expireAfterAccess [iceberg]
Posted by "github-actions[bot] (via GitHub) via issues" <is...@iceberg.apache.org>.
github-actions[bot] commented on PR #18536:
URL: https://github.com/apache/iceberg/pull/18536#issuecomment-6903871997
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org