Skip to content

Core: Add freshness-aware loading to RESTTableOperations#16319

Open
yadavay-amzn wants to merge 1 commit into
apache:mainfrom
yadavay-amzn:fix/15109-rest-table-ops-freshness
Open

Core: Add freshness-aware loading to RESTTableOperations#16319
yadavay-amzn wants to merge 1 commit into
apache:mainfrom
yadavay-amzn:fix/15109-rest-table-ops-freshness

Conversation

@yadavay-amzn
Copy link
Copy Markdown
Contributor

@yadavay-amzn yadavay-amzn commented May 13, 2026

Summary

Adds ETag/If-None-Match support to RESTTableOperations.refresh() and commit(), so repeated refresh calls skip re-downloading unchanged table metadata.

Follow-up to #15109 (freshness-aware table loading in REST catalog).

Changes

When RESTTableOperations.refresh() receives an ETag from the server, subsequent refresh() calls send If-None-Match and return the current metadata on 304 Not Modified. The ETag is also captured from commit responses so the next refresh benefits immediately.

This reduces bandwidth and server load for repeated refresh calls (retries, transactions, reconciliation) without any API changes or cache coupling.

Scope

This is the minimal self-contained slice of #15109. Deliberately out of scope:

  • FileIO credential refresh (blocked by final field, needs design discussion)
  • Cache callback to RESTSessionCatalog (adds coupling, can be a follow-up)
  • Config/credential updates on commit (REST spec does not include them)

Testing

5 new tests in TestRESTTableOperationsFreshness:

  • ETag sent on second refresh
  • Current metadata returned on 304
  • No header sent without prior ETag
  • ETag captured from commit response
  • If-None-Match merged with existing read headers

@github-actions github-actions Bot added the core label May 13, 2026
When RESTTableOperations.refresh() receives an ETag from the server, subsequent
refresh() calls send If-None-Match and skip metadata re-download on 304 Not
Modified. This reduces bandwidth and server load for repeated refresh calls
(retries, transactions, reconciliation).

Closes apache#15109
@yadavay-amzn yadavay-amzn force-pushed the fix/15109-rest-table-ops-freshness branch from b2a2850 to b585f22 Compare May 13, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant