Skip to content

Commit

Permalink
[inner-1585] fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyh1 committed Jan 6, 2022
1 parent 0df825e commit ba29379
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void okResponse(byte[] data, @NotNull AbstractService service) {
err0.setPacketId(shardingService.nextPacketId());
err0.setErrNo(ErrorCode.ER_META_DATA);
String msg = "DDL executed successfully, maybe there's something wrong with update_ddl_metadata or notice_cluster_ddl. You are advised to analyze dble log first, then decide whether to execute 'reload @@metadata'.";
err.setMessage(StringUtil.encode(msg, shardingService.getCharset().getResults()));
err0.setMessage(StringUtil.encode(msg, shardingService.getCharset().getResults()));
packet = err0;
}
QueryResultDispatcher.doSqlStat(rrs, session, 0, netOutBytes, resultSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ public void execute() {

@Override
public void handlerTableByNode(boolean isSucc, String tableName0, String shardingNode) {
DDLTraceHelper.log2(currShardingService, DDLTraceHelper.Stage.update_ddl_metadata, "In shardingNode[" + shardingNode + "], fetching " + (isSucc ? "success." : "fail"));
DDLTraceHelper.log2(currShardingService, DDLTraceHelper.Stage.update_ddl_metadata, "In shardingNode[" + shardingNode + "], fetching " + (isSucc ? "success" : "fail"));
}

@Override
public void handlerTable(TableMeta tableMeta) {
if (tableMeta != null) {
ProxyMeta.getInstance().getTmManager().addTable(schema, tableMeta, isCreateSql);
metaInited = true;
DDLTraceHelper.log2(currShardingService, DDLTraceHelper.Stage.update_ddl_metadata, DDLTraceHelper.Status.succ, "Successful to update table[" + schema + "." + tableMeta.getTableName() + "]metadata");
DDLTraceHelper.log2(currShardingService, DDLTraceHelper.Stage.update_ddl_metadata, DDLTraceHelper.Status.succ, "Successful to update table[" + schema + "." + tableMeta.getTableName() + "]’s metadata");
} else {
DDLTraceHelper.log2(currShardingService, DDLTraceHelper.Stage.update_ddl_metadata, DDLTraceHelper.Status.fail, "Failed to update table[" + schema + "." + tableName + "]metadata");
DDLTraceHelper.log2(currShardingService, DDLTraceHelper.Stage.update_ddl_metadata, DDLTraceHelper.Status.fail, "Failed to update table[" + schema + "." + tableName + "]’s metadata");
}
signalDone();
}
Expand Down

0 comments on commit ba29379

Please sign in to comment.