Fix ETag fallback to dataStoreETag for ring-s3-rdma-http objects#2622
Fix ETag fallback to dataStoreETag for ring-s3-rdma-http objects#2622borisfaure wants to merge 1 commit intodevelopment/8.4from
Conversation
When content-md5 is absent (e.g. parts written by ring-s3-rdma-http which stores ETag only as "1:<hex>" in dataStoreETag), fall back to extracting the hex portion from dataStoreETag for use as the ETag in list entries. Issue: ARSN-579
Hello borisfaure,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
| if (colon !== -1) { | ||
| etag = dst.slice(colon + 1); | ||
| } | ||
| } |
There was a problem hiding this comment.
No tests cover _parseListEntries today, and this adds non-trivial branching (array vs single location, colon parsing). Consider adding a unit test that exercises at least: (1) content-md5 present (existing behavior), (2) content-md5 absent with partLocations array containing a dataStoreETag like "1:abc123", (3) content-md5 absent with no partLocations.
— Claude Code
|
The ETag fallback logic is correct and handles edge cases well (undefined partLocations, empty array, missing colon). One concern: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development/8.4 #2622 +/- ##
===================================================
- Coverage 73.48% 73.47% -0.01%
===================================================
Files 222 222
Lines 18183 18193 +10
Branches 3787 3769 -18
===================================================
+ Hits 13361 13367 +6
- Misses 4817 4821 +4
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Falling back to datastore ETag seems very risky, as ETag may thus change: for exemple in case of transition (or other obscure features: transient locations...) to another storage location. |
When content-md5 is absent (e.g. parts written by ring-s3-rdma-http which stores ETag only as "1:" in dataStoreETag), fall back to extracting the hex portion from dataStoreETag for use as the ETag in list entries.
Issue: ARSN-579