You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/05/17 06:35:38 UTC

[GitHub] [rocketmq-connect] odbozhou commented on a diff in pull request #126: [ISSUE #124]Some sink /source metric statistics are incorrect

odbozhou commented on code in PR #126:
URL: https://github.com/apache/rocketmq-connect/pull/126#discussion_r874419300


##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSinkTask.java:
##########
@@ -421,7 +421,7 @@ private void pullMessageFromQueues() throws InterruptedException {
             if (null != pullResult && pullResult.getPullStatus().equals(PullStatus.FOUND)) {
                 this.incPullTPS(entry.getKey().getTopic(), pullResult.getMsgFoundList().size());
                 messages = pullResult.getMsgFoundList();
-                connectStatsManager.incSinkRecordReadTotalNums();
+                connectStatsManager.incSinkRecordReadTotalNums(messages.size());

Review Comment:
   The reason is the same as the source



##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSourceTask.java:
##########
@@ -167,8 +167,8 @@ public void run() {
                     try {
                         toSendRecord = poll();
                         if (null != toSendRecord && toSendRecord.size() > 0) {
-                            connectStatsManager.incSourceRecordPollTotalNums();
-                            connectStatsManager.incSourceRecordPollNums(taskConfig.getString(RuntimeConfigDefine.TASK_ID));
+                            connectStatsManager.incSourceRecordPollTotalNums(toSendRecord.size());

Review Comment:
   Shouldn't a new statistical dimension be defined? At present, SourceRecordPollTotalNums represents the total number of source task calls, and SourceRecordPollNums will record the number of data for each task



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org