Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
kubernetes-operator-1.7.0
Description
We have following code in the codebase
if (isSource && (numRecordsInPerSecond == null || numRecordsInPerSecond.getSum() == 0)) { numRecordsInPerSecond = flinkMetrics.get(FlinkMetric.SOURCE_TASK_NUM_RECORDS_IN_PER_SEC); }
if (isSource && (numRecordsInPerSecond == null || numRecordsInPerSecond.getSum() == 0)) { numRecordsInPerSecond = flinkMetrics.get(FlinkMetric.SOURCE_TASK_NUM_RECORDS_OUT_PER_SEC); }
with two times the same condition check
Definition of done:
Update getNumRecordsInPerSecond's second if condition from if (isSource && ...) to if (!isSource && ...). This addresses the redundant check and ensures correct metric fetching for non-source operators.
Attachments
Issue Links
- links to