laserninja opened a new pull request, #10641:
URL: https://github.com/apache/gravitino/pull/10641

   ### What changes were proposed in this pull request?
   
   Add ETag header to the `registerTable` response for consistency with 
`createTable` and `updateTable`, which already include ETags. This was 
identified by @roryqi in [#10536 
(comment)](https://github.com/apache/gravitino/pull/10536#issuecomment-4168013863).
   
   ### Why are the changes needed?
   
   The `registerTable` endpoint returns a `LoadTableResponse` but did not 
include an ETag header, unlike `createTable` and `updateTable`. This meant 
clients could not reuse ETags from `registerTable` for subsequent conditional 
`loadTable` requests (`If-None-Match`), breaking ETag consistency across all 
endpoints that return `LoadTableResponse`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No user-facing API changes. The `registerTable` response now includes an 
`ETag` header when the table metadata has a metadata file location.
   
   ### How was this patch tested?
   
   - Added `testRegisterTableReturnsETag` test verifying ETag presence in 
`registerTable` response.
   - Updated test mock (`CatalogWrapperForTest`) to return `TableMetadata` with 
a `metadataFileLocation` so ETag can be generated.
   - All existing ETag and namespace tests pass.
   


-- 
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]

Reply via email to