Wenzhe Zhou has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20258
Change subject: IMPALA-12305: Fix wrong Catalog Service ID when CatalogD becomes active ...................................................................... IMPALA-12305: Fix wrong Catalog Service ID when CatalogD becomes active In IMPALA-12286, catalogd re-generate its Catalog Service ID in JniCatalog when it becomes active. But CatalogServiceCatalog is not updated when new Catalog Service ID is generated. This causes coordinator hanging when processing DDLs. In CatalogServer class, is_active_ is not protected by mutex catalog_lock_, and pending_topic_updates_ is not cleared when the catalogd becomes active. It's possible catalog server sends pending catalog topic updates with old Catalog Service ID then sends catalog topic updates with new Catalog Service ID. This patch sets the Catalog Service ID for CatalogServiceCatalog when new Catalog Service ID is generated. It makes is_active_ to be protected by mutex catalog_lock_, and makes catalog server to clear pending_topic_updates_ when the catalogd becomes active. Testing: - Added more queries in test cases for CatalogD HA. Verified that test cases failed without fix, and test cases were passed after fix. - Passed core tests. Change-Id: I5eada89052c5f16209c6f16357f30f78b4497434 --- M be/src/catalog/catalog-server.cc M be/src/catalog/catalog-server.h M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java M fe/src/main/java/org/apache/impala/service/JniCatalog.java M tests/custom_cluster/test_catalogd_ha.py 5 files changed, 94 insertions(+), 58 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/58/20258/1 -- To view, visit http://gerrit.cloudera.org:8080/20258 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5eada89052c5f16209c6f16357f30f78b4497434 Gerrit-Change-Number: 20258 Gerrit-PatchSet: 1 Gerrit-Owner: Wenzhe Zhou <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Andrew Sherman <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]>
