This is an automated email from the ASF dual-hosted git repository. csringhofer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit de853576d160281c5add82dec9a4299d4f226563 Author: Kunal Siyag <[email protected]> AuthorDate: Fri Jan 23 16:01:37 2026 +0530 IMPALA-10706: Remove unnecessary metastoreAccessLock_ from TableLoader The metastoreAccessLock_ was added as a workaround for HIVE-5457, a DataNucleus concurrency bug from 2013 that occurred when directly connecting to the Hive Metastore backend database. This lock is no longer necessary because: - Impala uses RetryingMetaStoreClient (thrift client) to connect to HMS over the network, not directly to the database - The HIVE-5457 bug only affected direct DB connections via DataNucleus - HMS handles concurrency internally via its own connection pooling Removing this lock allows concurrent getTable() calls, improving metadata loading performance. Testing: Verified no remaining references to metastoreAccessLock_ exist. Full testing will be done via gerrit-verify-dryrun. Written with assistance from Antigravity (Claude Opus 4.5 model). Change-Id: Id480c474c6a095e95a6f412e835a23dd7880f3f1 Reviewed-on: http://gerrit.cloudera.org:8080/23894 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- fe/src/main/java/org/apache/impala/catalog/TableLoader.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/fe/src/main/java/org/apache/impala/catalog/TableLoader.java b/fe/src/main/java/org/apache/impala/catalog/TableLoader.java index 6098e5521..a6f902f63 100644 --- a/fe/src/main/java/org/apache/impala/catalog/TableLoader.java +++ b/fe/src/main/java/org/apache/impala/catalog/TableLoader.java @@ -53,11 +53,6 @@ public class TableLoader { private static final Logger LOG = LoggerFactory.getLogger(TableLoader.class); private final CatalogServiceCatalog catalog_; - - // Lock used to serialize calls to the Hive MetaStore to work around MetaStore - // concurrency bugs. Currently used to serialize calls to "getTable()" due to - // HIVE-5457. - private static final Object metastoreAccessLock_ = new Object(); private Metrics metrics_ = new Metrics(); public TableLoader(CatalogServiceCatalog catalog) { @@ -88,12 +83,9 @@ public class TableLoader { try (ThreadNameAnnotator tna = new ThreadNameAnnotator(annotation); MetaStoreClient msClient = catalog_.getMetaStoreClient(catalogTimeline)) { org.apache.hadoop.hive.metastore.api.Table msTbl = null; - // All calls to getTable() need to be serialized due to HIVE-5457. Stopwatch hmsLoadSW = Stopwatch.createStarted(); - synchronized (metastoreAccessLock_) { - msTbl = msClient.getHiveClient().getTable(db.getName(), tblName); - catalogTimeline.markEvent(FETCHED_HMS_TABLE); - } + msTbl = msClient.getHiveClient().getTable(db.getName(), tblName); + catalogTimeline.markEvent(FETCHED_HMS_TABLE); if (eventId != -1 && catalog_.isEventProcessingEnabled()) { // If the eventId is not -1 it means this table was likely created by Impala. // However, since the load operation of the table can happen much later, it is
