Skip to content

Commit a8db784

Browse files
committed
Minor cleanup.
1 parent 9d4cbab commit a8db784

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/DocLayer.actor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,9 @@ int main(int argc, char** argv) {
955955
}
956956
#endif
957957
if (metricPluginPath && metricPluginPath[0]) {
958-
TraceEvent(SevInfo, "MetricsInit").detail("pluginPath", metricPluginPath).detail("config", metricReporterConfig);
958+
TraceEvent(SevInfo, "MetricsInit")
959+
.detail("pluginPath", metricPluginPath)
960+
.detail("config", metricReporterConfig);
959961
DocumentLayer::metricReporter = IMetricReporter::init(metricPluginPath, metricReporterConfig.c_str());
960962
} else {
961963
// default to use `ConsoleMetric` plugin

src/ExtMsg.actor.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,17 +331,15 @@ ACTOR static Future<int32_t> addDocumentsFromCursor(Reference<Cursor> cursor,
331331

332332
while (!numberToReturn || remaining) {
333333
try {
334-
335334
if ((returned <= DOCLAYER_KNOBS->MAX_RETURNABLE_DOCUMENTS ||
336335
returnedSize <= DOCLAYER_KNOBS->DEFAULT_RETURNABLE_DATA_SIZE) &&
337336
returnedSize <= DOCLAYER_KNOBS->MAX_RETURNABLE_DATA_SIZE) {
337+
338338
Reference<ScanReturnedContext> doc = waitNext(cursor->docs);
339-
bson::BSONObj obj =
340-
doc->toDataValue()
341-
.get()
342-
.getPackedObject()
343-
.getOwned(); // Note that this call to get() is safe here but not in general, because we know
344-
// that doc is wrapping a BsonContext, which means toDataValue() is synchronous.
339+
340+
// Note that this call to get() is safe here but not in general, because we know
341+
// that doc is wrapping a BsonContext, which means toDataValue() is synchronous.
342+
bson::BSONObj obj = doc->toDataValue().get().getPackedObject().getOwned();
345343
cursor->checkpoint->getDocumentFinishedLock()->release();
346344
reply->addDocument(obj);
347345

@@ -469,7 +467,7 @@ ACTOR static Future<Void> runQuery(Reference<ExtConnection> ec,
469467
}
470468

471469
// If EXHAUST not set OR it is but we got <=0 results, stop.
472-
if (!(msg->flags & EXHAUST) || returned <= 0)
470+
if (!exhaust || returned <= 0)
473471
break;
474472

475473
++replies;

0 commit comments

Comments
 (0)