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
main
Yanqin Jin 5 years ago committed by Facebook Github Bot
parent edaaa1fff2
commit 946c43a026
  1. 3
      table/sst_file_writer.cc

@ -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.");
}
}

Loading…
Cancel
Save