Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/24275 )
Change subject: IMPALA-14949: Fix Catalogd Startup Deadlock ...................................................................... Patch Set 1: (2 comments) Thanks for reproducing the issue and the quick fix! The patch is safe and correct but I hope we can keep the optimization we did for IMPALA-13850 (part 4). http://gerrit.cloudera.org:8080/#/c/24275/1/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java File fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java: http://gerrit.cloudera.org:8080/#/c/24275/1/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java@2611 PS1, Line 2611: triggeredInitialReset_ > same here. This reverts the optimization we did in IMPALA-13850 (part 4) so catalogd requests still need to wait for the initial reset to finish, no matter whether their dbs have been loaded. I think we can fix the issue like IMPALA-14400 by using ReadLockAndLookupDb. Left a comment in getOrLoadTable(). http://gerrit.cloudera.org:8080/#/c/24275/1/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java@2808 PS1, Line 2808: acquireVersionReadLock(catalogTimeline); The problem is we acquire the lock first before the waiting. I think we should actually wait before the lock by using ReadLockAndLookupDb: - acquireVersionReadLock(catalogTimeline); - try { - tbl = getTable(dbName, tblName); + try (ReadLockAndLookupDb result = new ReadLockAndLookupDb(dbName)) { + catalogTimeline.markEvent(GOT_CATALOG_VERSION_READ_LOCK); + Db db = result.getDb(); + if (db == null) { + throw new DatabaseNotFoundException("Database '" + dbName + "' not found"); + } + tbl = db.getTable(tblName); So once the initial reset finishes loading the db of this request, this thread can move forward when the initial reset temporarily releases the versionLock_ write lock. -- To view, visit http://gerrit.cloudera.org:8080/24275 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibe71980d6fed5a95b00bc7b710c781f909545404 Gerrit-Change-Number: 24275 Gerrit-PatchSet: 1 Gerrit-Owner: Jason Fehr <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]> Gerrit-Comment-Date: Wed, 06 May 2026 03:28:46 +0000 Gerrit-HasComments: Yes
