Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/23194 )
Change subject: IMPALA-14220 (part 2): Delay AcceptRequest until catalog is stable ...................................................................... Patch Set 8: (9 comments) The patch is ready for review again. http://gerrit.cloudera.org:8080/#/c/23194/7//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23194/7//COMMIT_MSG@25 PS7, Line 25: numCatalogResetStarts_ on ev > numCatalogResetStarts_ Done http://gerrit.cloudera.org:8080/#/c/23194/7/be/src/catalog/catalog-server.h File be/src/catalog/catalog-server.h: http://gerrit.cloudera.org:8080/#/c/23194/7/be/src/catalog/catalog-server.h@316 PS7, Line 316: /// Set min_catalog_resets_to_serve_ to the current catalog resets + 1 to delay : /// AcceptRequest() until the reset operation begin in JVM. : void MarkPendingMetadataReset(const std::un > Stale docs. Done http://gerrit.cloudera.org:8080/#/c/23194/6/be/src/catalog/catalog-server.h File be/src/catalog/catalog-server.h: http://gerrit.cloudera.org:8080/#/c/23194/6/be/src/catalog/catalog-server.h@144 PS6, Line 144: bool WaitCatalogReadinessForWorkloadManagement(); > Has a Jira been created for this TODO? Removed this since we changed the implementation to track num of started catalog resets. http://gerrit.cloudera.org:8080/#/c/23194/6/be/src/catalog/catalog-server.h@236 PS6, Line 236: /// obtained first. : std::mutex ha_transition_lock_; : > Needs to update this. Done http://gerrit.cloudera.org:8080/#/c/23194/7/be/src/catalog/catalog-server.cc File be/src/catalog/catalog-server.cc: http://gerrit.cloudera.org:8080/#/c/23194/7/be/src/catalog/catalog-server.cc@617 PS7, Line 617: is_active_(!FLAGS_enable_catalo > Should this init to 1? Right! In case MarkPendingMetadataReset() fails to get this from JVM, we just bumps this value so need it to be inited correctly. It should be 1 since the startup already does one reset. http://gerrit.cloudera.org:8080/#/c/23194/7/be/src/catalog/catalog-server.cc@860 PS7, Line 860: i > remove whitespace. Done http://gerrit.cloudera.org:8080/#/c/23194/7/be/src/catalog/catalog.cc File be/src/catalog/catalog.cc: http://gerrit.cloudera.org:8080/#/c/23194/7/be/src/catalog/catalog.cc@136 PS7, Line 136: get_num_catalog_reset_s Fixed the wrong id here http://gerrit.cloudera.org:8080/#/c/23194/6/be/src/catalog/workload-management-init.cc File be/src/catalog/workload-management-init.cc: http://gerrit.cloudera.org:8080/#/c/23194/6/be/src/catalog/workload-management-init.cc@516 PS6, Line 516: return is_active_.Load(); > Does catalog_lock_ need to be held here? This has been changed back to AtomicBool and I think it's ok to read this AtomicBool directly after IsCatalogInitialized() returns true (which means the HA state is determinded), i.e. the active catalogd will have last_sent_catalog_version_ > 0 and the standby catalogd will have is_ha_determined_ && !is_active_.Load() so both of them return true in IsCatalogInitialized(). This method is only used in startup and won't be used in catalogd HA failover so I think we are fine here. http://gerrit.cloudera.org:8080/#/c/23194/7/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/23194/7/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java@307 PS7, Line 307: cLong numCatalogResetS > Make this AtomicLong so that read/write does not need to hold catalog_lock_ Good point. -- To view, visit http://gerrit.cloudera.org:8080/23194 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I370d21319335318e441ec3c3455bac4227803900 Gerrit-Change-Number: 23194 Gerrit-PatchSet: 8 Gerrit-Owner: Riza Suminto <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Comment-Date: Mon, 28 Jul 2025 15:58:44 +0000 Gerrit-HasComments: Yes
