From 91e6e3b0195e4ab6e9e79370990602e8d1b82fb5 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Sun, 17 Mar 2024 20:31:01 +0100 Subject: [PATCH] Synchronize listing tables in file metastore This is to prevent listing tables failures when tables dropped concurrently. This also fixes IDE warning about synchronization not matching `@GuardedBy` annotations. --- .../io/trino/plugin/hive/metastore/file/FileHiveMetastore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java index e07ca054d702..b55044d2435d 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java @@ -521,7 +521,7 @@ public synchronized void updatePartitionStatistics(Table table, StatisticsUpdate } @Override - public List getTables(String databaseName) + public synchronized List getTables(String databaseName) { return listAllTables(databaseName); }