Files
impala/be
wzhou-code 434ae61e38 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 removes catalogServiceId_ from CatalogServiceCatalog, and
makes CatalogServiceCatalog to call JniCatalog.getServiceId() directly.
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
Reviewed-on: http://gerrit.cloudera.org:8080/20258
Reviewed-by: Andrew Sherman <asherman@cloudera.com>
Reviewed-by: Riza Suminto <riza.suminto@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2023-07-26 05:23:44 +00:00
..
2017-08-31 01:40:47 +00:00