summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2013-08-20 11:15:29 -0400
committerMathias Stearn <mathias@10gen.com>2013-08-20 14:49:09 -0400
commitf1f9514ad9840bfd7dea9cf9ee1b6b3ce7563e11 (patch)
tree3c217803a98f03b050e3de901c4dc88e7cc7a6a2
parentbce592fe7c5f21c7d9e7cd3b3b6d0fa97df4096d (diff)
downloadmongo-f1f9514ad9840bfd7dea9cf9ee1b6b3ce7563e11.tar.gz
SERVER-10210 Correctly compute 90%
-rw-r--r--src/mongo/db/sorter/sorter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/sorter/sorter.cpp b/src/mongo/db/sorter/sorter.cpp
index 532b8ef9d64..4b41d9e4dc5 100644
--- a/src/mongo/db/sorter/sorter.cpp
+++ b/src/mongo/db/sorter/sorter.cpp
@@ -793,7 +793,7 @@ namespace mongo {
verify(compressed.size() <= size_t(std::numeric_limits<int32_t>::max()));
try {
- if (compressed.size() < size_t(_buffer.len()/9*10)) {
+ if (compressed.size() < size_t(_buffer.len()/10*9)) {
const int32_t size = -compressed.size(); // negative means compressed
_file.write(reinterpret_cast<const char*>(&size), sizeof(size));
_file.write(compressed.data(), compressed.size());