Skip to content

Commit

Permalink
0004097: remove sym_data_event.router_id
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 2, 2019
1 parent 1848bbd commit 085b7b1
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -73,7 +73,7 @@ public class ConvertToReloadRouter extends AbstractDataRouter implements IDataRo
Types.VARCHAR, Types.VARCHAR, Types.TIMESTAMP };

private final static String INSERT_DATA_EVENT_SQL = "insert into sym_data_event " +
"(data_id, batch_id, router_id, create_time) values (?, ?, ?, current_timestamp)";
"(data_id, batch_id, create_time) values (?, ?, current_timestamp)";

protected ISymmetricEngine engine;

Expand Down Expand Up @@ -262,7 +262,7 @@ protected void queueEvents(ChannelRouterContext context, ISqlTransaction transac
batchByNode.put(nodeId, batch);
}
batch.incrementTableCount(tableName);
insertDataEvent(transaction, tableInfo, batch.getBatchId(), dataId);
insertDataEvent(transaction, batch.getBatchId(), dataId);
context.getDataIds().add(dataId);
}
insertBatchMs += (System.currentTimeMillis() - ts);
Expand Down Expand Up @@ -307,9 +307,9 @@ protected long insertData(ISqlTransaction transaction, TableInfo tableInfo, Stri
return dataId;
}

protected void insertDataEvent(ISqlTransaction transaction, TableInfo tableInfo, long batchId, long dataId) {
transaction.prepareAndExecute(INSERT_DATA_EVENT_SQL, new Object[] { dataId, batchId, tableInfo.getRouterInfo().getRouter().getRouterId() },
new int[] { Types.NUMERIC, Types.NUMERIC, Types.VARCHAR });
protected void insertDataEvent(ISqlTransaction transaction, long batchId, long dataId) {
transaction.prepareAndExecute(INSERT_DATA_EVENT_SQL, new Object[] { dataId, batchId },
new int[] { Types.NUMERIC, Types.NUMERIC });
}

public void setSymmetricEngine(ISymmetricEngine engine) {
Expand Down

0 comments on commit 085b7b1

Please sign in to comment.