From 759301fa34a6438df14cd538ab3465b47d08600f Mon Sep 17 00:00:00 2001 From: August Date: Tue, 30 Nov 2021 21:31:23 +0800 Subject: [PATCH] fix: fix catalog inconsistency, disable heartbeat in remote catalog service, support multi-frontend in future. --- .../com/risingwave/catalog/RemoteCatalogService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/java/catalog/src/main/java/com/risingwave/catalog/RemoteCatalogService.java b/java/catalog/src/main/java/com/risingwave/catalog/RemoteCatalogService.java index 6a967f53e6984..413423d802483 100644 --- a/java/catalog/src/main/java/com/risingwave/catalog/RemoteCatalogService.java +++ b/java/catalog/src/main/java/com/risingwave/catalog/RemoteCatalogService.java @@ -34,7 +34,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; @@ -61,7 +60,13 @@ public RemoteCatalogService(MetaClient client) { this.databaseByName = new ConcurrentHashMap<>(); this.creatingTable = new ConcurrentHashMap<>(); initCatalog(); - startHeartbeatSchedule(Executors.newSingleThreadScheduledExecutor()); + /* + FIXME: simply stop heartbeat here. There still got an asynchrony inconsistency between create table and + table dropped detection in heartbeat. ReadWrite lock should be introduced here to ensure consistency + which will brings some overhead here. Since heartbeat is only a temporary solution for multi-frontends + deployment, we will fix this when broadcast catalog solution finished development in meta service. + */ + // startHeartbeatSchedule(Executors.newSingleThreadScheduledExecutor()); } private void startHeartbeatSchedule(ScheduledExecutorService service) {