|
1 | 1 | /*
|
2 |
| -* Copyright (C) 2016-2020 ActionTech. |
3 |
| -* based on code by MyCATCopyrightHolder Copyright (c) 2013, OpenCloudDB/MyCAT. |
4 |
| -* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. |
5 |
| -*/ |
| 2 | + * Copyright (C) 2016-2020 ActionTech. |
| 3 | + * based on code by MyCATCopyrightHolder Copyright (c) 2013, OpenCloudDB/MyCAT. |
| 4 | + * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher. |
| 5 | + */ |
6 | 6 | package com.actiontech.dble.config;
|
7 | 7 |
|
8 | 8 | import com.actiontech.dble.DbleServer;
|
|
15 | 15 | import com.actiontech.dble.config.model.*;
|
16 | 16 | import com.actiontech.dble.config.util.ConfigException;
|
17 | 17 | import com.actiontech.dble.config.util.ConfigUtil;
|
| 18 | +import com.actiontech.dble.meta.SchemaMeta; |
18 | 19 | import com.actiontech.dble.route.parser.ManagerParseConfig;
|
19 | 20 | import com.actiontech.dble.route.parser.util.Pair;
|
20 | 21 | import com.actiontech.dble.server.variables.SystemVariables;
|
@@ -433,7 +434,10 @@ private boolean reloadMetaData(List<Pair<String, String>> delTables, List<Pair<S
|
433 | 434 | LOGGER.debug("metadata will delete Tables:" + tables);
|
434 | 435 | }
|
435 | 436 | for (Pair<String, String> table : delTables) {
|
436 |
| - ProxyMeta.getInstance().getTmManager().getCatalogs().get(table.getKey()).dropTable(table.getValue()); |
| 437 | + SchemaMeta oldSchemaMeta = ProxyMeta.getInstance().getTmManager().getCatalogs().get(table.getKey()); |
| 438 | + if (oldSchemaMeta != null) { |
| 439 | + oldSchemaMeta.dropTable(table.getValue()); |
| 440 | + } |
437 | 441 | }
|
438 | 442 | LOGGER.info("metadata finished for deleted tables");
|
439 | 443 | }
|
|
0 commit comments