Cq-study opened a new pull request, #681: URL: https://github.com/apache/doris-flink-connector/pull/681
# Proposed changes Issue Number: related to #639 ## Problem Summary: The connector registers rich per-table counters (`totalFlushLoadBytes`, `totalFlushLoadedRows`, ...) on the `SinkWriterMetricGroup`, but never updates the standard FLIP-33 sink metrics `numRecordsSend` / `numBytesSend`. They stay at 0, so the Flink Web UI metrics tab and any dashboard/alerting built on the standard connector metrics cannot observe Doris sink throughput. (Note: the "Bytes/Records Received/Sent" boxes on the job overview page counting 0 for a fully chained CdcTools job is expected Flink behavior — those only count data exchanged between tasks. This PR makes the standard sink metrics usable instead.) ### What is changed In `DorisWriteMetrics`: - fetch `numRecordsSend` / `numBytesSend` from the `SinkWriterMetricGroup` during `register` - increment them with `NumberLoadedRows` / `LoadBytes` of every successful stream load response, alongside the existing connector-specific counters The two counters are writer-scoped (the metric group returns the same counter instance), so multi-table sinks aggregate across tables correctly. Add `TestDorisWriteMetrics` covering: successful flush updates both standard counters, aggregation across two tables, and failed flush leaving them untouched. ### Why `numRecordsSend` / `numBytesSend` are the standardized connector metrics (FLIP-33) that users and monitoring systems expect from every sink. `SinkWriterMetricGroup#getNumRecordsSendCounter` / `getNumBytesSendCounter` are available in all supported Flink versions (1.15+ and 2.x). ## Checklist(Required) 1. Does it affect the original behavior: No (only adds metric reporting) 2. Has unit tests been added: Yes 3. Has document been added or modified: No 4. Does it need to update dependencies: No 5. Are there any changes that cannot be rolled back: No -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
