You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/06/05 03:28:16 UTC

[GitHub] [incubator-doris] morningman opened a new issue #3778: [Catalog] Should not use `getInstance()` of Catalog anymore

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] kangkaisen commented on issue #3778: [Catalog] Should not use `getInstance()` of Catalog anymore

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on issue #3778:
URL: https://github.com/apache/incubator-doris/issues/3778#issuecomment-639276716


   +1.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] imay closed issue #3778: [Catalog] Should not use `getInstance()` of Catalog anymore

Posted by GitBox <gi...@apache.org>.
imay closed issue #3778:
URL: https://github.com/apache/incubator-doris/issues/3778


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org