This is an automated email from the ASF dual-hosted git repository.
Jackie-Jiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 18d18ac2afa Split upsert keys-not-replaced metric by table type
(#19748)
18d18ac2afa is described below
commit 18d18ac2afac08809e49fd3f862270388d163f70
Author: Chaitanya Deepthi <[email protected]>
AuthorDate: Mon Oct 5 18:27:47 2026 -0700
Split upsert keys-not-replaced metric by table type (#19748)
---
.../java/org/apache/pinot/common/metrics/ServerMeter.java | 1 +
.../local/upsert/BasePartitionUpsertMetadataManager.java | 11 +++++++----
...MapPartitionUpsertMetadataManagerForConsistentDeletes.java | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git
a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerMeter.java
b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerMeter.java
index 0d45a8f1950..91ca1327069 100644
---
a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerMeter.java
+++
b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerMeter.java
@@ -64,6 +64,7 @@ public enum ServerMeter implements AbstractMetrics.Meter {
UPSERT_KEYS_IN_WRONG_SEGMENT("rows", false),
PARTIAL_UPSERT_OUT_OF_ORDER("rows", false),
PARTIAL_UPSERT_KEYS_NOT_REPLACED("rows", false),
+ FULL_UPSERT_KEYS_NOT_REPLACED("rows", false),
UPSERT_OUT_OF_ORDER("rows", false),
DELETED_KEYS_TTL_PRIMARY_KEYS_REMOVED("rows", false),
TOTAL_KEYS_MARKED_FOR_DELETION("rows", false),
diff --git
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
index 7314a72eb24..9c1351f6dc6 100644
---
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
+++
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
@@ -705,7 +705,7 @@ public abstract class BasePartitionUpsertMetadataManager
implements PartitionUps
}
_logger.warn("Found {} primary keys not replaced for segment: {}",
validDocIdsForOldSegment.getCardinality(), segmentName);
- updateInconsistentRowsMetric(segmentName,
validDocIdsForOldSegment.getCardinality());
+ updateInconsistentRowsMetric(validDocIdsForOldSegment.getCardinality());
removeSegment(oldSegment, validDocIdsForOldSegment);
}
}
@@ -749,19 +749,22 @@ public abstract class BasePartitionUpsertMetadataManager
implements PartitionUps
if (numKeysStillNotReplaced > 0) {
_logger.warn("Found {} primary keys not replaced for segment: {} after
revert attempt",
numKeysStillNotReplaced, segmentName);
- updateInconsistentRowsMetric(segmentName, numKeysStillNotReplaced);
+ updateInconsistentRowsMetric(numKeysStillNotReplaced);
// Clear the map when inconsistencies still exist for the consuming
segments
clearPrevKeyToRecordLocation();
}
}
- protected void updateInconsistentRowsMetric(String segmentName, int
numKeysStillNotReplaced) {
+ protected void updateInconsistentRowsMetric(int numKeysStillNotReplaced) {
if (_partialUpsertHandler != null) {
_serverMetrics.addMeteredTableValue(_tableNameWithType,
ServerMeter.PARTIAL_UPSERT_KEYS_NOT_REPLACED,
numKeysStillNotReplaced);
- } else {
+ } else if (_context.isDropOutOfOrderRecord() ||
_context.getOutOfOrderRecordColumn() != null) {
_serverMetrics.addMeteredTableValue(_tableNameWithType,
ServerMeter.REALTIME_UPSERT_INCONSISTENT_ROWS,
numKeysStillNotReplaced);
+ } else {
+ _serverMetrics.addMeteredTableValue(_tableNameWithType,
ServerMeter.FULL_UPSERT_KEYS_NOT_REPLACED,
+ numKeysStillNotReplaced);
}
}
diff --git
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes.java
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes.java
index 19c0c301bfc..d64ee9e0b9f 100644
---
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes.java
+++
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes.java
@@ -308,7 +308,7 @@ public class
ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes
}
_logger.warn("Found {} primary keys not replaced for segment: {}",
validDocIdsForOldSegment.getCardinality(), segmentName);
- updateInconsistentRowsMetric(segmentName,
validDocIdsForOldSegment.getCardinality());
+
updateInconsistentRowsMetric(validDocIdsForOldSegment.getCardinality());
}
// we want to always remove a segment in case of
enableDeletedKeysCompactionConsistency = true
// this is to account for the removal of primary-key in the
to-be-removed segment and reduce
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]