cshuo opened a new pull request, #19117: URL: https://github.com/apache/hudi/pull/19117
### Describe the issue this Pull Request addresses Flink stream writes currently do not expose coordinator-side visibility into how many write instants are waiting to be committed. This PR adds a write coordinator metric for pending commit instants and wires it directly to the coordinator's completed event buffers. ### Summary and Changelog - Added `FlinkWriteCoordinatorMetrics` to register the `pendingCommitInstantCount` gauge. - Wired `StreamWriteOperatorCoordinator` to register coordinator metrics on start and expose the pending commit instant count for testing. - Updated `EventBuffers#getAllCompletedEvents` to exclude empty data-write buffers from the completed-events count. - Added coverage in `TestFlinkWriteCoordinatorMetrics` for gauge registration and dynamic gauge values. - Added coordinator-level coverage in `TestStreamWriteOperatorCoordinator` to verify pending commit count before and after checkpoint completion. ### Impact Adds a new Flink write coordinator metric, `pendingCommitInstantCount`, for observing completed instants pending commit. ### Risk Level low. ### Documentation Update Not included in this commit. If Flink write coordinator metrics are documented in a metrics reference, `pendingCommitInstantCount` should be added there. ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Enough context is provided in the sections above - [ ] Adequate tests were added if applicable -- 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]
