This is an automated email from the ASF dual-hosted git repository. agoncharuk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new d281fa4 IGNITE-11394 Fixed infinite 'no next node in topology' loop - Fixes #6182. d281fa4 is described below commit d281fa4036bb9872aec6ca608134e65fdedc2877 Author: Alexey Goncharuk <alexey.goncha...@gmail.com> AuthorDate: Fri Mar 1 18:23:36 2019 +0300 IGNITE-11394 Fixed infinite 'no next node in topology' loop - Fixes #6182. Signed-off-by: Alexey Goncharuk <alexey.goncha...@gmail.com> --- .../org/apache/ignite/spi/discovery/tcp/ServerImpl.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java index 50af845..df863ce 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java @@ -2791,11 +2791,21 @@ class ServerImpl extends TcpDiscoveryImpl { } /** - * Adds message to queue. + * Adds message to queue. Equivalent to {@code addMessage(msg, false)}. * * @param msg Message to add. */ void addMessage(TcpDiscoveryAbstractMessage msg) { + addMessage(msg, false); + } + + /** + * Adds message to queue. + * + * @param msg Message to add. + * @param ignoreHighPriority If {@code true}, high priority messages will be added to the top of the queue. + */ + void addMessage(TcpDiscoveryAbstractMessage msg, boolean ignoreHighPriority) { DebugLogger log = messageLogger(msg); if ((msg instanceof TcpDiscoveryStatusCheckMessage || @@ -2809,7 +2819,7 @@ class ServerImpl extends TcpDiscoveryImpl { return; } - if (msg.highPriority()) + if (msg.highPriority() && !ignoreHighPriority) queue.addFirst(msg); else queue.add(msg); @@ -3129,7 +3139,7 @@ class ServerImpl extends TcpDiscoveryImpl { !(msg instanceof TcpDiscoveryStatusCheckMessage && msg.creatorNodeId().equals(locNodeId))) { msg.senderNodeId(locNodeId); - addMessage(msg); + addMessage(msg, true); } break;