Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEODE-8920: Modify debug logging to make it easier to trace a message #6041

Merged
merged 1 commit into from Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -211,7 +211,7 @@ private int sendToMany(final Membership mgr,
InternalDistributedMember[] p_destinations,
final DistributionMessage msg, long ackWaitThreshold, long ackSAThreshold)
throws ConnectExceptions, NotSerializableException {
InternalDistributedMember destinations[] = p_destinations;
InternalDistributedMember[] destinations = p_destinations;

// Collects connect exceptions that happened during previous attempts to send.
// These represent members we are not able to distribute to.
Expand Down Expand Up @@ -276,7 +276,7 @@ private int sendToMany(final Membership mgr,
retryInfo = null;
retry = true;
}
final List cons = new ArrayList(destinations.length);
final List<Connection> cons = new ArrayList<>(destinations.length);
ConnectExceptions ce = getConnections(mgr, msg, destinations, orderedMsg, retry, ackTimeout,
ackSDTimeout, cons);

Expand All @@ -299,9 +299,9 @@ private int sendToMany(final Membership mgr,
return bytesWritten;
}

if (retry && logger.isDebugEnabled()) {
logger.debug("Retrying send ({}{}) to {} peers ({}) via tcp/ip",
msg, cons.size(), cons);
if (logger.isDebugEnabled()) {
logger.debug("{} on these {} connections: {}",
(retry ? "Retrying send" : "Sending"), cons.size(), cons);
}
DMStats stats = getDMStats();
List<?> sentCons; // used for cons we sent to this time
Expand Down
Expand Up @@ -3224,7 +3224,7 @@ void readHandshakeForSender(DataInputStream dis, ByteBuffer peerDataBuffer) {
private void setThreadName(int dominoNumber) {
Thread.currentThread().setName(THREAD_KIND_IDENTIFIER + " for " + remoteAddr + " "
+ (sharedResource ? "" : "un") + "shared" + " " + (preserveOrder ? "" : "un")
+ "ordered" + " uid=" + uniqueId + (dominoNumber > 0 ? " dom #" + dominoNumber : "")
+ "ordered sender uid=" + uniqueId + (dominoNumber > 0 ? " dom #" + dominoNumber : "")
+ " local port=" + socket.getLocalPort() + " remote port=" + socket.getPort());
}

Expand Down