This is an automated email from the ASF dual-hosted git repository. kharekartik 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 f0b78b44e3 Bug fix: reset primary key count to 0 when table is deleted (#12169) f0b78b44e3 is described below commit f0b78b44e38a424a652735f66557994b7f6e6c43 Author: Kartik Khare <kharekar...@gmail.com> AuthorDate: Tue Dec 19 17:47:14 2023 +0530 Bug fix: reset primary key count to 0 when table is deleted (#12169) --- .../segment/local/upsert/BasePartitionUpsertMetadataManager.java | 5 +++++ 1 file changed, 5 insertions(+) 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 b7f9696b11..f13875c759 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 @@ -772,6 +772,11 @@ public abstract class BasePartitionUpsertMetadataManager implements PartitionUps } } doClose(); + // We don't remove the segment from the metadata manager when + // it's closed. This was done to make table deletion faster. Since we don't remove the segment, we never decrease + // the primary key count. So, we set the primary key count to 0 here. + _serverMetrics.setValueOfPartitionGauge(_tableNameWithType, _partitionId, ServerGauge.UPSERT_PRIMARY_KEYS_COUNT, + 0L); _logger.info("Closed the metadata manager"); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org