You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ty...@apache.org on 2016/09/22 19:11:47 UTC
cassandra git commit: Include session IDs in repair start message
Repository: cassandra
Updated Branches:
refs/heads/trunk f92f959eb -> c92928bb9
Include session IDs in repair start message
Patch by Chris Lohfink; reviewed by Tyler Hobbs for CASSANDRA-12532
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c92928bb
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c92928bb
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c92928bb
Branch: refs/heads/trunk
Commit: c92928bb9c2441254b51e2ea4dc742c9245b9f4c
Parents: f92f959
Author: Chris Lohfink <cl...@gmail.com>
Authored: Thu Aug 25 13:41:13 2016 -0500
Committer: Tyler Hobbs <ty...@gmail.com>
Committed: Thu Sep 22 14:11:30 2016 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/repair/RepairRunnable.java | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c92928bb/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index df3c775..8d96050 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.10
+ * Include repair session IDs in repair start message (CASSANDRA-12532)
* Add a blocking task to Index, run before joining the ring (CASSANDRA-12039)
* Fix NPE when using CQLSSTableWriter (CASSANDRA-12667)
* Support optional backpressure strategies at the coordinator (CASSANDRA-9318)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c92928bb/src/java/org/apache/cassandra/repair/RepairRunnable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/repair/RepairRunnable.java b/src/java/org/apache/cassandra/repair/RepairRunnable.java
index ca06bcb..efa8234 100644
--- a/src/java/org/apache/cassandra/repair/RepairRunnable.java
+++ b/src/java/org/apache/cassandra/repair/RepairRunnable.java
@@ -110,7 +110,7 @@ public class RepairRunnable extends WrappedRunnable implements ProgressEventNoti
protected void runMayThrow() throws Exception
{
final TraceState traceState;
-
+ final UUID parentSession = UUIDGen.getTimeUUID();
final String tag = "repair:" + cmd;
final AtomicInteger progress = new AtomicInteger();
@@ -131,10 +131,9 @@ public class RepairRunnable extends WrappedRunnable implements ProgressEventNoti
}
final long startTime = System.currentTimeMillis();
- String message = String.format("Starting repair command #%d, repairing keyspace %s with %s", cmd, keyspace,
+ String message = String.format("Starting repair command #%d (%s), repairing keyspace %s with %s", cmd, parentSession, keyspace,
options);
logger.info(message);
- fireProgressEvent(tag, new ProgressEvent(ProgressEventType.START, 0, 100, message));
if (options.isTraced())
{
StringBuilder cfsb = new StringBuilder();
@@ -144,6 +143,8 @@ public class RepairRunnable extends WrappedRunnable implements ProgressEventNoti
UUID sessionId = Tracing.instance.newSession(Tracing.TraceType.REPAIR);
traceState = Tracing.instance.begin("repair", ImmutableMap.of("keyspace", keyspace, "columnFamilies",
cfsb.substring(2)));
+ message = message + " tracing with " + sessionId;
+ fireProgressEvent(tag, new ProgressEvent(ProgressEventType.START, 0, 100, message));
Tracing.traceRepair(message);
traceState.enableActivityNotification(tag);
for (ProgressListener listener : listeners)
@@ -154,6 +155,7 @@ public class RepairRunnable extends WrappedRunnable implements ProgressEventNoti
}
else
{
+ fireProgressEvent(tag, new ProgressEvent(ProgressEventType.START, 0, 100, message));
traceState = null;
}
@@ -204,7 +206,6 @@ public class RepairRunnable extends WrappedRunnable implements ProgressEventNoti
cfnames[i] = columnFamilyStores.get(i).name;
}
- final UUID parentSession = UUIDGen.getTimeUUID();
SystemDistributedKeyspace.startParentRepair(parentSession, keyspace, cfnames, options);
long repairedAt;
try