Skip to content

Commit

Permalink
0003115: You can miss sym_monitor_event sync's because they are on the
Browse files Browse the repository at this point in the history
heartbeat channel. Create a new "monitor" channel.
  • Loading branch information
chenson42 committed May 18, 2017
1 parent d3d9f09 commit 8e90ab4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ private Constants() {
public static final String MBEAN_SERVER = "mbeanserver";

public static final String CHANNEL_HEARTBEAT = "heartbeat";

public static final String CHANNEL_MONITOR = "monitor";

public static final String CHANNEL_CONFIG = "config";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ protected void createDefaultChannels() {
new Channel(Constants.CHANNEL_RELOAD, 1, 1, 1, true, 0, false, true, false));
}

updatedDefaultChannels.put(Constants.CHANNEL_MONITOR,
new Channel(Constants.CHANNEL_MONITOR, 2, 100, 100, true, 0, false));

updatedDefaultChannels.put(Constants.CHANNEL_HEARTBEAT,
new Channel(Constants.CHANNEL_HEARTBEAT, 2, 100, 100, true, 0, false));
updatedDefaultChannels.put(Constants.CHANNEL_DEFAULT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,10 @@ protected Trigger buildTriggerForSymmetricTable(String tableName) {
trigger.setSyncOnIncomingBatch(syncOnIncoming);
trigger.setSourceTableName(tableName);
trigger.setUseCaptureOldData(false);
if (TableConstants.getTableName(tablePrefix, TableConstants.SYM_NODE_HOST).equals(tableName)
|| TableConstants.getTableName(tablePrefix, TableConstants.SYM_MONITOR_EVENT).equals(tableName)) {
if (TableConstants.getTableName(tablePrefix, TableConstants.SYM_NODE_HOST).equals(tableName)) {
trigger.setChannelId(Constants.CHANNEL_HEARTBEAT);
} else if (TableConstants.getTableName(tablePrefix, TableConstants.SYM_MONITOR_EVENT).equals(tableName)) {
trigger.setChannelId(Constants.CHANNEL_MONITOR);
} else if (TableConstants.getTableName(tablePrefix, TableConstants.SYM_FILE_SNAPSHOT)
.equals(tableName)) {
trigger.setChannelId(Constants.CHANNEL_DYNAMIC);
Expand Down

0 comments on commit 8e90ab4

Please sign in to comment.