Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22602
Change subject: KUDU-3649: Fix hms_notification_log_event_id_ not being loaded correctly ...................................................................... KUDU-3649: Fix hms_notification_log_event_id_ not being loaded correctly hms_notification_log_event_id_ of CatalogManager tracks latest processed Hive Metastore notification log event ID. It's loaded in PrepareForLeadershipTask() when hms_catalog_ is not null. However, hms_catalog_ is initialized in CatalogManager::Init() in another thread. If the thread of PrepareForLeadershipTask() acquires leader_lock_ first, CatalogManager::Init() has no chance to initialize hms_catalog_. Then the work of updating hms_notification_log_event_id_ will be skipped. It's value remains the default (-1), leading kudu-master to polling all notification events from Hive Metastore. This patch fixes the check by using hms::HmsCatalog::IsEnabled() instead of checking hms_catalog_. The work of loading hms_notification_log_event_id_ doens't use hms_catalog_ actually. Also improves logging in HmsClient to show the batch size and start event id in GetNotificationEvents(). So it's easier to notice similar issues. Tests - Verified in a local build that hms_notification_log_event_id_ is loaded as expected. Change-Id: I3678692e0df0311c6831bcaf2786f657a2fe5625 --- M src/kudu/hms/hms_client.cc M src/kudu/master/catalog_manager.cc 2 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/02/22602/1 -- To view, visit http://gerrit.cloudera.org:8080/22602 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3678692e0df0311c6831bcaf2786f657a2fe5625 Gerrit-Change-Number: 22602 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]>
