Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/9458 )
Change subject: IMPALA-6583: Wait for non-empty catalog update at impalad startup ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/9458/2/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/9458/2/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java@1123 PS2, Line 1123: // The reset operation itself should bump the catalog version. The important "why" part is missing from the comment. My understanding is that impalad catalogs become ready once the version is > 0, so we need to bump this version to ensure that impalads become ready even if the catalog is empty. Correct? http://gerrit.cloudera.org:8080/#/c/9458/2/fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java File fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java: http://gerrit.cloudera.org:8080/#/c/9458/2/fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java@213 PS2, Line 213: if (newCatalogVersion > INITIAL_CATALOG_VERSION) { This is subtle and needs an explanation. How can we get an update with INITIAL_CATALOG_VERSION? >From looking at CatalogServer::Start(), we see this sequence: * JniCatalog is created which creates a CatalogServiceCatalog and calls reset() on that catalog. At this point the catalog is populated and should have a version > 0. * After that first step, the catalog server registers with the statestore and starts processing catalog topic updates. So how can an impalad ever see an update with a version of 0? http://gerrit.cloudera.org:8080/#/c/9458/2/fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java@214 PS2, Line 214: isReady_.set(true); Do we still need this flag? It seems to be implied by version > 0. -- To view, visit http://gerrit.cloudera.org:8080/9458 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie5f09d03497543f283b39c6186ecfda2e0097c87 Gerrit-Change-Number: 9458 Gerrit-PatchSet: 2 Gerrit-Owner: Tianyi Wang <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Comment-Date: Tue, 27 Feb 2018 18:08:52 +0000 Gerrit-HasComments: Yes
