imay commented on a change in pull request #761: Remove colocate table meta
when drop db
URL: https://github.com/apache/incubator-doris/pull/761#discussion_r266225121
##########
File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -2359,7 +2359,7 @@ public void createDb(CreateDbStmt stmt) throws
DdlException {
Database db = new Database(id, fullDbName);
db.setClusterName(clusterName);
unprotectCreateDb(db);
- editLog.logCreateDb(db);
+ Catalog.getInstance().getEditLog().logCreateDb(db);
Review comment:
I think it isn't a good idea to use `getInstance()` here, because this may
lead some error if another `Catalog` exist in system, and it is strange to call
`getInstance()` to get itself.
In addition I think it is better to limit use of singleton as little as
possible.
So, could you find another way to write unit test?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]