Skip to content

Commit

Permalink
Print out stack track on ReplicaThread calling getBootstrapReplica (#…
Browse files Browse the repository at this point in the history
…2673)

We are seeing getBootstrapReplica being called in ReplicaThread somehow. And we can't figure out how it's been called. This PR adds a stacktrace for that. Will remove it when we know the call chain.
  • Loading branch information
justinlin-linkedin authored Dec 13, 2023
1 parent ad3e12c commit 55e47ea
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,11 @@ private ReplicaId getBootstrapReplicaInSemiAuto(String partitionIdStr, DataNodeI
bootstrapReplica = new AmbryServerReplica(clusterMapConfig, currentPartition, targetDisk, true, replicaCapacity,
ReplicaSealStatus.NOT_SEALED);
logger.info("Created bootstrap replica {} for Partition {}", bootstrapReplica, partitionIdStr);
Thread currentThread = Thread.currentThread();
// TODO: Remove this code after figuring out why ReplicaThread is calling this method.
if (currentThread.getName().contains("ReplicaThread")) {
logger.error("Method invocation in wrong thread {}", currentThread.getName(), new Exception(""));
}
} catch (Exception e) {
logger.error("Failed to create bootstrap replica for partition {} on {} due to exception: ", partitionIdStr,
instanceName, e);
Expand Down

0 comments on commit 55e47ea

Please sign in to comment.