morningman opened a new issue #3778: URL: https://github.com/apache/incubator-doris/issues/3778
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: 1. `getInstance()` is used to get Formal Catalog. 2. `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. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org