FastRestore:Logging for getReplyBatches
This commit is contained in:
parent
d22af629cd
commit
2fec56e7e2
|
@ -593,6 +593,7 @@ void ServerKnobs::initialize(bool randomize, ClientKnobs* clientKnobs, bool isSi
|
||||||
init( FASTRESTORE_LOADER_SEND_MUTATION_MSG_BYTES, 1.0 * 1024.0 * 1024.0 ); if( randomize && BUGGIFY ) { FASTRESTORE_LOADER_SEND_MUTATION_MSG_BYTES = deterministicRandom()->random01() * 10.0 * 1024.0 * 1024.0 + 1; }
|
init( FASTRESTORE_LOADER_SEND_MUTATION_MSG_BYTES, 1.0 * 1024.0 * 1024.0 ); if( randomize && BUGGIFY ) { FASTRESTORE_LOADER_SEND_MUTATION_MSG_BYTES = deterministicRandom()->random01() * 10.0 * 1024.0 * 1024.0 + 1; }
|
||||||
init( FASTRESTORE_GET_RANGE_VERSIONS_EXPENSIVE, false ); if( randomize && BUGGIFY ) { FASTRESTORE_GET_RANGE_VERSIONS_EXPENSIVE = deterministicRandom()->random01() < 0.5 ? true : false; }
|
init( FASTRESTORE_GET_RANGE_VERSIONS_EXPENSIVE, false ); if( randomize && BUGGIFY ) { FASTRESTORE_GET_RANGE_VERSIONS_EXPENSIVE = deterministicRandom()->random01() < 0.5 ? true : false; }
|
||||||
init( FASTRESTORE_REQBATCH_PARALLEL, 50 ); if( randomize && BUGGIFY ) { FASTRESTORE_REQBATCH_PARALLEL = deterministicRandom()->random01() * 100 + 1; }
|
init( FASTRESTORE_REQBATCH_PARALLEL, 50 ); if( randomize && BUGGIFY ) { FASTRESTORE_REQBATCH_PARALLEL = deterministicRandom()->random01() * 100 + 1; }
|
||||||
|
init( FASTRESTORE_REQBATCH_LOG, false ); if( randomize && BUGGIFY ) { FASTRESTORE_REQBATCH_LOG = deterministicRandom()->random01() < 0.2 ? true : false; }
|
||||||
|
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
|
|
@ -531,6 +531,7 @@ public:
|
||||||
int64_t FASTRESTORE_LOADER_SEND_MUTATION_MSG_BYTES; // desired size of mutation message sent from loader to appliers
|
int64_t FASTRESTORE_LOADER_SEND_MUTATION_MSG_BYTES; // desired size of mutation message sent from loader to appliers
|
||||||
bool FASTRESTORE_GET_RANGE_VERSIONS_EXPENSIVE; // parse each range file to get (range, version) it has?
|
bool FASTRESTORE_GET_RANGE_VERSIONS_EXPENSIVE; // parse each range file to get (range, version) it has?
|
||||||
int64_t FASTRESTORE_REQBATCH_PARALLEL; // number of requests to wait on for getBatchReplies()
|
int64_t FASTRESTORE_REQBATCH_PARALLEL; // number of requests to wait on for getBatchReplies()
|
||||||
|
bool FASTRESTORE_REQBATCH_LOG; // verbose log information for getReplyBatches
|
||||||
|
|
||||||
ServerKnobs();
|
ServerKnobs();
|
||||||
void initialize(bool randomize = false, ClientKnobs* clientKnobs = NULL, bool isSimulated = false);
|
void initialize(bool randomize = false, ClientKnobs* clientKnobs = NULL, bool isSimulated = false);
|
||||||
|
|
|
@ -281,13 +281,16 @@ Future<Void> getBatchReplies(RequestStream<Request> Interface::*channel, std::ma
|
||||||
ongoingReplies.clear();
|
ongoingReplies.clear();
|
||||||
ongoingRepliesIndex.clear();
|
ongoingRepliesIndex.clear();
|
||||||
for (int i = 0; i < cmdReplies.size(); ++i) {
|
for (int i = 0; i < cmdReplies.size(); ++i) {
|
||||||
// TraceEvent(SevDebug, "FastRestoreGetBatchReplies")
|
if (SERVER_KNOBS->FASTRESTORE_REQBATCH_LOG) {
|
||||||
// .detail("Requests", requests.size())
|
TraceEvent(SevInfo, "FastRestoreGetBatchReplies")
|
||||||
// .detail("OutstandingReplies", oustandingReplies)
|
.detail("Requests", requests.size())
|
||||||
// .detail("ReplyIndex", i)
|
.detail("OutstandingReplies", oustandingReplies)
|
||||||
// .detail("ReplyReady", cmdReplies[i].isReady())
|
.detail("ReplyIndex", i)
|
||||||
// .detail("RequestNode", requests[i].first)
|
.detail("ReplyIsReady", cmdReplies[i].isReady())
|
||||||
// .detail("Request", requests[i].second.toString());
|
.detail("ReplyIsError", cmdReplies[i].isError())
|
||||||
|
.detail("RequestNode", requests[i].first)
|
||||||
|
.detail("Request", requests[i].second.toString());
|
||||||
|
}
|
||||||
if (!cmdReplies[i].isReady()) { // still wait for reply
|
if (!cmdReplies[i].isReady()) { // still wait for reply
|
||||||
ongoingReplies.push_back(cmdReplies[i]);
|
ongoingReplies.push_back(cmdReplies[i]);
|
||||||
ongoingRepliesIndex.push_back(i);
|
ongoingRepliesIndex.push_back(i);
|
||||||
|
|
Loading…
Reference in New Issue