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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
