Skip to content

Commit 0c8c4c9

Browse files
authored
Move LoadTableMetaDataFailedException to mode core (#34947)
1 parent fb360ef commit 0c8c4c9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.apache.shardingsphere.mode.manager.cluster.exception;
18+
package org.apache.shardingsphere.mode.exception;
1919

2020
import org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
21-
import org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ClusterSQLException;
21+
import org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.MetaDataSQLException;
2222

2323
/**
24-
* Reload table meta failed exception.
24+
* Load table meta data failed exception.
2525
*/
26-
public final class ReloadTableMetaFailedException extends ClusterSQLException {
26+
public final class LoadTableMetaDataFailedException extends MetaDataSQLException {
2727

28-
public ReloadTableMetaFailedException() {
29-
super(XOpenSQLState.GENERAL_ERROR, 12, "Failed to reload table meta data.");
28+
public LoadTableMetaDataFailedException() {
29+
super(XOpenSQLState.GENERAL_ERROR, 12, "Failed to load table meta data.");
3030
}
3131
}

mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/ClusterMetaDataManagerPersistService.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
3232
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereView;
3333
import org.apache.shardingsphere.mode.manager.cluster.exception.ReloadMetaDataContextFailedException;
34-
import org.apache.shardingsphere.mode.manager.cluster.exception.ReloadTableMetaFailedException;
34+
import org.apache.shardingsphere.mode.exception.LoadTableMetaDataFailedException;
3535
import org.apache.shardingsphere.mode.manager.cluster.persist.coordinator.database.ClusterDatabaseListenerCoordinatorType;
3636
import org.apache.shardingsphere.mode.manager.cluster.persist.coordinator.database.ClusterDatabaseListenerPersistCoordinator;
3737
import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
@@ -234,7 +234,7 @@ private void reloadAlteredTables(final String databaseName, final MetaDataContex
234234
}
235235
} catch (final SQLException ex) {
236236
log.error("Reload table meta failed, databaseName:{}, needReloadTables:{}", databaseName, needReloadTables, ex);
237-
throw new ReloadTableMetaFailedException();
237+
throw new LoadTableMetaDataFailedException();
238238
}
239239
}
240240

0 commit comments

Comments
 (0)