nsivabalan opened a new pull request, #19369:
URL: https://github.com/apache/hudi/pull/19369

   ### Change Logs
   
   `TimelineServerBasedWriteMarkers#create` silently returned `Option.empty()` 
when the timeline server's marker creation request failed, instead of raising 
an error. Callers of `WriteMarkers#create` do not check the returned `Option` 
for emptiness, so a failed marker creation was treated as if it succeeded, 
allowing a write to proceed and create a data file without a durable marker for 
it. Marker-based rollback of a failed write would then miss such files.
   
   Changes:
   - `TimelineServerBasedWriteMarkers#create` now throws `HoodieIOException` 
when the marker creation request fails, instead of returning `Option.empty()`, 
so the failure surfaces to the writer.
   - Relaxes `executeCreateMarkerRequest`'s visibility to package-private so it 
can be overridden in tests to simulate a failure.
   - Adds `testMarkerCreationFailure` to `TestTimelineServerBasedWriteMarkers`, 
asserting the exception is thrown with the expected message on a simulated 
failure.
   
   ### Impact
   
   No public API change. Writers using timeline-server-based markers now get an 
exception (instead of a silent no-op) when a marker creation request fails, so 
a data file is not written without a durable marker.
   
   ### Risk level
   
   low. New unit test covers the failure path of marker creation.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Change Logs and Impact were stated clearly
   - [x] Adequate tests were added if applicable
   - [ ] CI passed


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