Skip to content

Commit 01dcf32

Browse files
authored
[To dev/1.3] Pipe: Delete the heartbeat event count in Remaining Count #16115 (#16116)
* Pipe: Delete the heartbeat event count in Remaining Count * update * delete getRemainingEvents function
1 parent b8d829c commit 01dcf32

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/metric/overview/PipeDataNodeRemainingEventAndTimeOperator.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,6 @@ public int getInsertNodeEventCount() {
120120
return insertNodeEventCount.get();
121121
}
122122

123-
long getRemainingEvents() {
124-
final long remainingEvents =
125-
tsfileEventCount.get()
126-
+ rawTabletEventCount.get()
127-
+ insertNodeEventCount.get()
128-
+ heartbeatEventCount.get()
129-
+ schemaRegionExtractors.stream()
130-
.map(IoTDBSchemaRegionSource::getUnTransferredEventCount)
131-
.reduce(Long::sum)
132-
.orElse(0L);
133-
134-
// There are cases where the indicator is negative. For example, after the Pipe is restarted,
135-
// the Processor SubTask is still collecting Events, resulting in a negative count. This
136-
// situation cannot be avoided because the Pipe may be restarted internally.
137-
return remainingEvents >= 0 ? remainingEvents : 0;
138-
}
139-
140123
/**
141124
* This will calculate the estimated remaining time of pipe.
142125
*

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/metric/overview/PipeDataNodeSinglePipeMetrics.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private void createAutoGauge(final String pipeID) {
8989
Metric.PIPE_DATANODE_REMAINING_EVENT_COUNT.toString(),
9090
MetricLevel.IMPORTANT,
9191
operator,
92-
PipeDataNodeRemainingEventAndTimeOperator::getRemainingEvents,
92+
PipeDataNodeRemainingEventAndTimeOperator::getRemainingNonHeartbeatEvents,
9393
Tag.NAME.toString(),
9494
operator.getPipeName(),
9595
Tag.CREATION_TIME.toString(),
@@ -403,7 +403,7 @@ public Pair<Long, Double> getRemainingEventAndTime(
403403
remainingEventAndTimeOperatorMap.computeIfAbsent(
404404
pipeName + "_" + creationTime,
405405
k -> new PipeDataNodeRemainingEventAndTimeOperator(pipeName, creationTime));
406-
return new Pair<>(operator.getRemainingEvents(), operator.getRemainingTime());
406+
return new Pair<>(operator.getRemainingNonHeartbeatEvents(), operator.getRemainingTime());
407407
}
408408

409409
//////////////////////////// singleton ////////////////////////////

0 commit comments

Comments
 (0)