Skip to content

Commit cb10eda

Browse files
KaiSernLimclaude
andcommitted
🤖 [server][da-vinci] Exclude remote VTs from Global RT DIV consumed bytes tra
cking When isGlobalRtDivEnabled, consumedBytesSinceLastSync should only track local version topic (keyed by VT name) and real-time topics (keyed by broker URL). Remote version topics are excluded from the map entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5e5fd02 commit cb10eda

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎clients/da-vinci-client/src/main/java/com/linkedin/davinci/kafka/consumer/StoreIngestionTask.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,10 +1493,13 @@ protected void produceToStoreBufferServiceOrKafka(
14931493
elapsedTimeForPuttingIntoQueue);
14941494
totalBytesRead += recordSize;
14951495
if (isGlobalRtDivEnabled()) {
1496-
// Key by version topic name when consuming from VT, else by RT broker URL
1496+
// Key by version topic name when consuming from local VT, by RT broker URL when consuming from RT.
1497+
// Remote VTs are excluded from tracking.
14971498
PubSubTopic topic = topicPartition.getPubSubTopic();
1498-
String consumedBytesKey = versionTopic.equals(topic) ? versionTopic.getName() : kafkaUrl;
1499-
consumedBytesSinceLastSync.compute(consumedBytesKey, (k, v) -> (v == null) ? recordSize : v + recordSize);
1499+
if (versionTopic.equals(topic) || topic.isRealTime()) {
1500+
String consumedBytesKey = versionTopic.equals(topic) ? versionTopic.getName() : kafkaUrl;
1501+
consumedBytesSinceLastSync.compute(consumedBytesKey, (k, v) -> (v == null) ? recordSize : v + recordSize);
1502+
}
15001503
}
15011504
}
15021505

0 commit comments

Comments
 (0)