From e7309a353514e15a98ad82fb5a2023cf43a1b8bd Mon Sep 17 00:00:00 2001 From: Balachandar Namasivayam Date: Thu, 8 Mar 2018 13:53:59 -0800 Subject: [PATCH] Add trace events to print the ranges in ConsistencyCheck. --- fdbserver/workloads/ConsistencyCheck.actor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fdbserver/workloads/ConsistencyCheck.actor.cpp b/fdbserver/workloads/ConsistencyCheck.actor.cpp index f6a778ef327..ef86574165f 100644 --- a/fdbserver/workloads/ConsistencyCheck.actor.cpp +++ b/fdbserver/workloads/ConsistencyCheck.actor.cpp @@ -682,6 +682,7 @@ struct ConsistencyCheckWorkload : TestWorkload state Key lastSampleKey; state Key lastStartSampleKey; state int64_t totalReadAmount = 0; + state int64_t rangeBytes = 0; state KeySelector begin = firstGreaterOrEqual(range.begin); @@ -725,6 +726,9 @@ struct ConsistencyCheckWorkload : TestWorkload { state GetKeyValuesReply current = rangeResult.get(); totalReadAmount += current.data.expectedSize(); + if (j == 0) { + rangeBytes += current.data.expectedSize(); + } //If we haven't encountered a valid storage server yet, then mark this as the baseline to compare against if(firstValidServer == -1) firstValidServer = j; @@ -911,6 +915,8 @@ struct ConsistencyCheckWorkload : TestWorkload } } + TraceEvent("ConsistencyCheck_CheckedRange").detail("Range", printable(range)).detail("Bytes", rangeBytes); + canSplit = canSplit && sampledBytes - splitBytes >= shardBounds.min.bytes && sampledBytes > splitBytes; //Update the size of all storage servers containing this shard