提交 946c43a0 编写于 作者: Y Yanqin Jin 提交者: Facebook Github Bot

Improve error msg for SstFileWriter Merge (#6261)

Summary:
Reword the error message when keys are not added in strict ascending order.
Specifically, original error message is not clear when application tries to
call SstFileWriter::Merge() with duplicate keys.

Test plan (dev server)
```
make check
```
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6261

Differential Revision: D19290398

Pulled By: riversand963

fbshipit-source-id: 4dc30a701414e6894db2eb024e3734470c22b371
上级 edaaa1ff
...@@ -70,7 +70,8 @@ struct SstFileWriter::Rep { ...@@ -70,7 +70,8 @@ struct SstFileWriter::Rep {
if (internal_comparator.user_comparator()->Compare( if (internal_comparator.user_comparator()->Compare(
user_key, file_info.largest_key) <= 0) { user_key, file_info.largest_key) <= 0) {
// Make sure that keys are added in order // Make sure that keys are added in order
return Status::InvalidArgument("Keys must be added in order"); return Status::InvalidArgument(
"Keys must be added in strict ascending order.");
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册