Navigation Menu

Skip to content

Commit

Permalink
0004175: Node communication query for unsent batches not using index on
Browse files Browse the repository at this point in the history
Oracle
  • Loading branch information
erilong committed Dec 5, 2019
1 parent bb5ae6d commit 2425afa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -50,6 +50,7 @@
import org.jumpmind.symmetric.model.NodeCommunication;
import org.jumpmind.symmetric.model.NodeCommunication.CommunicationType;
import org.jumpmind.symmetric.model.NodeGroupLinkAction;
import org.jumpmind.symmetric.model.OutgoingBatch;
import org.jumpmind.symmetric.model.RemoteNodeStatus;
import org.jumpmind.symmetric.model.RemoteNodeStatuses;
import org.jumpmind.symmetric.service.IClusterService;
Expand Down Expand Up @@ -250,7 +251,8 @@ public List<NodeCommunication> list(CommunicationType communicationType) {

protected List<String> getNodeIdsWithUnsentCount() {
return sqlTemplate.query(getSql("selectNodeIdsWithUnsentBatchsSql"),
new StringMapper());
new StringMapper(), OutgoingBatch.Status.ER, OutgoingBatch.Status.NE, OutgoingBatch.Status.QY,
OutgoingBatch.Status.SE, OutgoingBatch.Status.LD, OutgoingBatch.Status.IG, OutgoingBatch.Status.RS);
}

protected List<NodeCommunication> filterForChannelThreading(List<Node> nodesToCommunicateWith) {
Expand Down
Expand Up @@ -34,7 +34,7 @@ public NodeCommunicationServiceSqlMap(IDatabasePlatform platform,

putSql("clearLocksOnRestartSql", "update $(node_communication) set lock_time=null where locking_server_id=? and lock_time is not null");

putSql("selectNodeIdsWithUnsentBatchsSql", "select distinct(node_id) from $(outgoing_batch) where status <> 'OK'");
putSql("selectNodeIdsWithUnsentBatchsSql", "select distinct(node_id) from $(outgoing_batch) where status in (?,?,?,?,?,?,?)");

putSql("selectNodeCommunicationSql",
"select * from $(node_communication) where communication_type=? order by node_priority DESC,last_lock_time");
Expand Down

0 comments on commit 2425afa

Please sign in to comment.