-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
area/catalogIssues or PRs related to catalog managementIssues or PRs related to catalog managementkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Description
Catalog is currently a singleton class.
In the Master FE, this singleton class actually has two instances: One is the Catalog used for formal services(Called Formal Catalog), and the other is the catalog used for metadata image generation(Called Checkpoint Catalog).
Therefore, we provide two ways to obtain catalog instance:
getInstance()is used to get Formal Catalog.getCurrentCatalog()is more intelligent, it will determine which catalog is actually returned by determining whether the current thread is a Checkpoint thread. If current thread is checkpoint thread, it will return Checkpoint Catalog. Otherwise, it will return Formal Catalog.
I decided to delete the getInstance() method and use getCurrentCatalog() uniformly.
Because the getInstance() method may introduce many errors.
For example, in the checkpoint process, all operations should be directed against the Checkpoint Catalog. If the getInstance() method is called incorrectly, it is equivalent to operating the Formal Catalog in the wrong operation, which will cause metadata errors.
WingsGo
Metadata
Metadata
Assignees
Labels
area/catalogIssues or PRs related to catalog managementIssues or PRs related to catalog managementkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.