summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
index 415081d334c..6f4bcf0d025 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
@@ -154,7 +154,9 @@ Status WiredTigerUtil::getApplicationMetadata(OperationContext* opCtx,
if (keysSeen.count(key)) {
return Status(ErrorCodes::DuplicateKey,
str::stream() << "app_metadata must not contain duplicate keys. "
- << "Found multiple instances of key '" << key << "'.");
+ << "Found multiple instances of key '"
+ << key
+ << "'.");
}
keysSeen.insert(key);
@@ -230,7 +232,9 @@ Status WiredTigerUtil::checkApplicationMetadataFormatVersion(OperationContext* o
if (version < minimumVersion || version > maximumVersion) {
return Status(ErrorCodes::UnsupportedFormat,
str::stream() << "Application metadata for " << uri
- << " has unsupported format version: " << version << ".");
+ << " has unsupported format version: "
+ << version
+ << ".");
}
LOG(2) << "WiredTigerUtil::checkApplicationMetadataFormatVersion "
@@ -278,7 +282,8 @@ StatusWith<uint64_t> WiredTigerUtil::getStatisticsValue(WT_SESSION* session,
if (ret != 0) {
return StatusWith<uint64_t>(ErrorCodes::CursorNotFound,
str::stream() << "unable to open cursor at URI " << uri
- << ". reason: " << wiredtiger_strerror(ret));
+ << ". reason: "
+ << wiredtiger_strerror(ret));
}
invariant(cursor);
ON_BLOCK_EXIT(cursor->close, cursor);
@@ -286,19 +291,21 @@ StatusWith<uint64_t> WiredTigerUtil::getStatisticsValue(WT_SESSION* session,
cursor->set_key(cursor, statisticsKey);
ret = cursor->search(cursor);
if (ret != 0) {
- return StatusWith<uint64_t>(ErrorCodes::NoSuchKey,
- str::stream() << "unable to find key " << statisticsKey
- << " at URI " << uri
- << ". reason: " << wiredtiger_strerror(ret));
+ return StatusWith<uint64_t>(
+ ErrorCodes::NoSuchKey,
+ str::stream() << "unable to find key " << statisticsKey << " at URI " << uri
+ << ". reason: "
+ << wiredtiger_strerror(ret));
}
uint64_t value;
ret = cursor->get_value(cursor, NULL, NULL, &value);
if (ret != 0) {
- return StatusWith<uint64_t>(ErrorCodes::BadValue,
- str::stream() << "unable to get value for key " << statisticsKey
- << " at URI " << uri
- << ". reason: " << wiredtiger_strerror(ret));
+ return StatusWith<uint64_t>(
+ ErrorCodes::BadValue,
+ str::stream() << "unable to get value for key " << statisticsKey << " at URI " << uri
+ << ". reason: "
+ << wiredtiger_strerror(ret));
}
return StatusWith<uint64_t>(value);
@@ -437,8 +444,8 @@ Status WiredTigerUtil::exportTableToBSON(WT_SESSION* session,
int ret = session->open_cursor(session, uri.c_str(), NULL, cursorConfig, &c);
if (ret != 0) {
return Status(ErrorCodes::CursorNotFound,
- str::stream() << "unable to open cursor at URI " << uri
- << ". reason: " << wiredtiger_strerror(ret));
+ str::stream() << "unable to open cursor at URI " << uri << ". reason: "
+ << wiredtiger_strerror(ret));
}
bob->append("uri", uri);
invariant(c);