AtomicOp:Debug
This commit is contained in:
parent
c4a11597cf
commit
bffb4e380d
|
@ -246,8 +246,8 @@ ACTOR static Future<Version> processRestoreRequest(Reference<RestoreMasterData>
|
||||||
|
|
||||||
std::sort(rangeFiles.begin(), rangeFiles.end());
|
std::sort(rangeFiles.begin(), rangeFiles.end());
|
||||||
std::sort(logFiles.begin(), logFiles.end(), [](RestoreFileFR const& f1, RestoreFileFR const& f2) -> bool {
|
std::sort(logFiles.begin(), logFiles.end(), [](RestoreFileFR const& f1, RestoreFileFR const& f2) -> bool {
|
||||||
return std::tie(f1.endVersion, f1.beginVersion, f1.fileIndex) <
|
return std::tie(f1.endVersion, f1.beginVersion, f1.fileIndex, f1.fileName) <
|
||||||
std::tie(f2.endVersion, f2.beginVersion, f2.fileIndex);
|
std::tie(f2.endVersion, f2.beginVersion, f2.fileIndex, f2.fileName);
|
||||||
});
|
});
|
||||||
|
|
||||||
self->buildVersionBatches(rangeFiles, logFiles, &self->versionBatches); // Divide files into version batches
|
self->buildVersionBatches(rangeFiles, logFiles, &self->versionBatches); // Divide files into version batches
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include "fdbserver/workloads/workloads.actor.h"
|
#include "fdbserver/workloads/workloads.actor.h"
|
||||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||||
|
|
||||||
|
#define SevAtomicOpDebug SevInfo
|
||||||
|
|
||||||
struct AtomicOpsWorkload : TestWorkload {
|
struct AtomicOpsWorkload : TestWorkload {
|
||||||
int opNum, actorCount, nodeCount;
|
int opNum, actorCount, nodeCount;
|
||||||
uint32_t opType;
|
uint32_t opType;
|
||||||
|
@ -182,7 +184,7 @@ struct AtomicOpsWorkload : TestWorkload {
|
||||||
try {
|
try {
|
||||||
int group = deterministicRandom()->randomInt(0,100);
|
int group = deterministicRandom()->randomInt(0,100);
|
||||||
state uint64_t intValue = deterministicRandom()->randomInt(0, 10000000);
|
state uint64_t intValue = deterministicRandom()->randomInt(0, 10000000);
|
||||||
Key val = StringRef((const uint8_t*) &intValue, sizeof(intValue));
|
state Key val = StringRef((const uint8_t*) &intValue, sizeof(intValue));
|
||||||
state std::pair<Key, Key> logDebugKey = self->logDebugKey(group);
|
state std::pair<Key, Key> logDebugKey = self->logDebugKey(group);
|
||||||
int nodeIndex = deterministicRandom()->randomInt(0, self->nodeCount / 100);
|
int nodeIndex = deterministicRandom()->randomInt(0, self->nodeCount / 100);
|
||||||
state Key opsKey(format("ops%08x%08x", group, nodeIndex));
|
state Key opsKey(format("ops%08x%08x", group, nodeIndex));
|
||||||
|
@ -190,6 +192,7 @@ struct AtomicOpsWorkload : TestWorkload {
|
||||||
tr.set(logDebugKey.second, opsKey); // set debug key; one opsKey can have multiple logs key
|
tr.set(logDebugKey.second, opsKey); // set debug key; one opsKey can have multiple logs key
|
||||||
tr.atomicOp(opsKey, val, self->opType);
|
tr.atomicOp(opsKey, val, self->opType);
|
||||||
wait( tr.commit() );
|
wait( tr.commit() );
|
||||||
|
TraceEvent(SevAtomicOpDebug, "AtomicOpWorker").detail("OpsKey", opsKey).detail("LogKey", logDebugKey.first).detail("Value", val.toString());
|
||||||
if (self->opType == MutationRef::AddValue) {
|
if (self->opType == MutationRef::AddValue) {
|
||||||
self->lbsum += intValue;
|
self->lbsum += intValue;
|
||||||
self->ubsum += intValue;
|
self->ubsum += intValue;
|
||||||
|
|
Loading…
Reference in New Issue