This is an automated email from the ASF dual-hosted git repository.
ankitsultana 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 2962dd445fb [bugfix] Initialize LogicalTableMetadataCache with
existing logical tables (#17374)
2962dd445fb is described below
commit 2962dd445fbd25e70d627afca14c96e4b50df5fd
Author: Shaurya Chaturvedi <[email protected]>
AuthorDate: Wed Dec 17 12:59:23 2025 -0800
[bugfix] Initialize LogicalTableMetadataCache with existing logical tables
(#17374)
* [bugfix] Initialize LogicalTableMetadataCache with existing logical tables
* Fixing NPE
---------
Co-authored-by: shauryachats <[email protected]>
---
.../pinot/common/config/provider/LogicalTableMetadataCache.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/pinot-common/src/main/java/org/apache/pinot/common/config/provider/LogicalTableMetadataCache.java
b/pinot-common/src/main/java/org/apache/pinot/common/config/provider/LogicalTableMetadataCache.java
index f1fae2c62ed..e0d9a847e44 100644
---
a/pinot-common/src/main/java/org/apache/pinot/common/config/provider/LogicalTableMetadataCache.java
+++
b/pinot-common/src/main/java/org/apache/pinot/common/config/provider/LogicalTableMetadataCache.java
@@ -72,6 +72,14 @@ public class LogicalTableMetadataCache {
// Add child listeners to the property store for logical table config
changes
_propertyStore.subscribeChildChanges(ZkPaths.LOGICAL_TABLE_PARENT_PATH,
_zkLogicalTableConfigChangeListener);
+ // Initialize the cache with existing logical table configs.
+ List<String> existingLogicalTables =
_propertyStore.getChildNames(ZkPaths.LOGICAL_TABLE_PARENT_PATH,
+ AccessOption.PERSISTENT);
+ if (CollectionUtils.isNotEmpty(existingLogicalTables)) {
+ LOGGER.info("Found {} existing logical tables in the property store,
initializing", existingLogicalTables.size());
+
_zkLogicalTableConfigChangeListener.handleChildChange(ZkPaths.LOGICAL_TABLE_PARENT_PATH,
existingLogicalTables);
+ }
+
LOGGER.info("Logical table metadata cache initialized");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]