Need to reduce log message in case: Topology projection is empty. Cluster group is empty - Fixes
@@ -53,6 +53,7 @@ import org.apache.ignite.IgniteSystemProperties;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.cluster.BaselineNode;
import org.apache.ignite.cluster.ClusterGroup;
+import org.apache.ignite.cluster.ClusterGroupEmptyException;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -2124,6 +2125,12 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
ClusterGroup nearNode = ignite.cluster().forNodeId(nearNodeId);
+ String txRequestInfo = String.format(
+ "[xidVer=%s, nodeId=%s]",
+ tx.xidVersion().toString(),
+ nearNodeId.toString()
+ );
+
if (allNodesSupports(nearNode.nodes(), TRANSACTION_OWNER_THREAD_DUMP_PROVIDING)) {
IgniteCompute compute = ignite.compute(ignite.cluster().forNodeId(nearNodeId));
@@ -2137,10 +2144,17 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
try {
traceDump = strIgniteFut.get();
}
+ catch (ClusterGroupEmptyException e) {
+ U.error(
+ diagnosticLog,
+ "Could not get thread dump from transaction owner because near node " +
+ "is now out of topology. " + txRequestInfo
+ );
+ }
catch (Exception e) {
U.error(
diagnosticLog,
- "Could not get thread dump from transaction owner near node: ",
+ "Could not get thread dump from transaction owner near node " + txRequestInfo,
e
);
}
@@ -2149,8 +2163,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
U.warn(
diagnosticLog,
String.format(
- "Dumping the near node thread that started transaction [xidVer=%s]\n%s",
- tx.xidVersion().toString(),
+ "Dumping the near node thread that started transaction %s\n%s",
+ txRequestInfo,
traceDump
)
);
@@ -2159,13 +2173,14 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
});
}
catch (Exception e) {
- U.error(diagnosticLog, "Could not send dump request to transaction owner near node: ", e);
+ U.error(diagnosticLog, "Could not send dump request to transaction owner near node " + txRequestInfo, e);
}
}
else {
U.warn(
diagnosticLog,
- "Could not send dump request to transaction owner near node: node does not support this feature."
+ "Could not send dump request to transaction owner near node: node does not support this feature. " +
+ txRequestInfo
);
}
}
