summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/resize_oplog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/resize_oplog.cpp')
-rw-r--r--src/mongo/db/commands/resize_oplog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/commands/resize_oplog.cpp b/src/mongo/db/commands/resize_oplog.cpp
index 3323cfc996c..e8d34e251a9 100644
--- a/src/mongo/db/commands/resize_oplog.cpp
+++ b/src/mongo/db/commands/resize_oplog.cpp
@@ -67,7 +67,7 @@ public:
}
virtual void help(stringstream& help) const {
- help << "resize oplog size";
+ help << "resize oplog size in MB";
}
Status checkAuthForCommand(Client* client,
@@ -107,8 +107,9 @@ public:
Status(ErrorCodes::InvalidOptions, "invalid size field, size should be a number"));
}
- long long size = jsobj["size"].numberLong();
- if (size < 990LL * 1024 * 1024) {
+ long long sizeMb = jsobj["size"].numberLong();
+ long long size = sizeMb * 1024 * 1024;
+ if (sizeMb < 990L) {
return appendCommandStatus(
result, Status(ErrorCodes::InvalidOptions, "oplog size should be 990MB at least"));
}