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
This commit is contained in:
Yanqin Jin 2020-01-06 10:55:53 -08:00 committed by Facebook Github Bot
parent edaaa1fff2
commit 946c43a026
1 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,8 @@ struct SstFileWriter::Rep {
if (internal_comparator.user_comparator()->Compare(
user_key, file_info.largest_key) <= 0) {
// 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.");
}
}