Skip to content

[AMORO-4190][ams] Graceful handling of catalog initialization failures in DefaultCatalogManager#4189

Merged
czy006 merged 1 commit into
apache:masterfrom
j1wonpark:catalog-init-failure-recovery
Apr 22, 2026
Merged

[AMORO-4190][ams] Graceful handling of catalog initialization failures in DefaultCatalogManager#4189
czy006 merged 1 commit into
apache:masterfrom
j1wonpark:catalog-init-failure-recovery

Conversation

@j1wonpark
Copy link
Copy Markdown
Contributor

@j1wonpark j1wonpark commented Apr 17, 2026

Why are the changes needed?

resolve #4190

Brief change log

  • DefaultCatalogManager: Wrap individual catalog loading in try-catch during initialization so that a single catalog failure is logged and skipped rather than crashing AMS
  • DefaultCatalogManager.updateCatalog(): When a catalog is not present in serverCatalogMap (failed to initialize), fall back to updating DB directly and attempt to rebuild with the new metadata, allowing operators to fix catalog configuration from the dashboard without restarting AMS
  • DefaultCatalogManager.removeServerCatalog(): Add @VisibleForTesting helper method for test support
  • TestDefaultCatalogManagerRecovery: Add tests verifying both initialization resilience and update recovery for failed catalogs

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

    • testInitializationSkipsFailedCatalog: Verifies that DefaultCatalogManager constructor does not throw when a REST catalog with an unreachable endpoint exists in the database
    • testUpdateCatalogThatFailedToInitialize: Verifies that updateCatalog() succeeds for a catalog that exists in DB but failed to load into serverCatalogMap
    • Both tests verified to FAIL without the fix and PASS with the fix
  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? No
  • If yes, how is the feature documented? Not applicable

… DefaultCatalogManager

- Wrap individual catalog loading in try-catch during initialization so
  that a single catalog failure is logged and skipped rather than crashing AMS
- When a catalog is not present in serverCatalogMap (failed to initialize),
  fall back to updating DB directly and attempt to rebuild with the new metadata
- Add tests verifying both initialization resilience and update recovery

Signed-off-by: Jiwon Park <jpark92@outlook.kr>
@j1wonpark j1wonpark force-pushed the catalog-init-failure-recovery branch from 1ef4556 to 5585847 Compare April 17, 2026 22:29
@j1wonpark j1wonpark changed the title [Improvement] Graceful handling of catalog initialization failures in DefaultCatalogManager [AMORO-4190][ams] Graceful handling of catalog initialization failures in DefaultCatalogManager Apr 17, 2026
@czy006 czy006 merged commit ec2a448 into apache:master Apr 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ams-server Ams server module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement]: Graceful handling of catalog initialization failures in DefaultCatalogManager

2 participants