Remove timeout_hint_us from WriteOptions

Summary:
The option has been deprecated for two years and has no effect. Removing.
Closes https://github.com/facebook/rocksdb/pull/1866

Differential Revision: D4555203

Pulled By: yiwu-arbug

fbshipit-source-id: c48f627
main
Yi Wu 8 years ago committed by Facebook Github Bot
parent fce7a6e196
commit 381fd32247
  1. 1
      HISTORY.md
  2. 3
      db/db_impl.cc
  3. 9
      db/db_test.cc
  4. 4
      include/rocksdb/options.h

@ -2,6 +2,7 @@
## Unreleased
### Public API Change
* Remove disableDataSync option.
* Remove timeout_hint_us option from WriteOptions. The option has been deprecated and has no effect since 3.13.0.
* Remove deprecated DB::AddFile and DB::CompactRange APIs;
## 5.2.0 (02/08/2017)

@ -4647,9 +4647,6 @@ Status DBImpl::WriteImpl(const WriteOptions& write_options,
if (my_batch == nullptr) {
return Status::Corruption("Batch is nullptr!");
}
if (write_options.timeout_hint_us != 0) {
return Status::InvalidArgument("timeout_hint_us is deprecated");
}
Status status;

@ -3363,15 +3363,6 @@ TEST_P(DBTestWithParam, FIFOCompactionTest) {
}
#endif // ROCKSDB_LITE
// verify that we correctly deprecated timeout_hint_us
TEST_F(DBTest, SimpleWriteTimeoutTest) {
WriteOptions write_opt;
write_opt.timeout_hint_us = 0;
ASSERT_OK(Put(Key(1), Key(1) + std::string(100, 'v'), write_opt));
write_opt.timeout_hint_us = 10;
ASSERT_NOK(Put(Key(1), Key(1) + std::string(100, 'v'), write_opt));
}
#ifndef ROCKSDB_LITE
/*
* This test is not reliable enough as it heavily depends on disk behavior.

@ -1579,9 +1579,6 @@ struct WriteOptions {
// and the write may got lost after a crash.
bool disableWAL;
// The option is deprecated. It's not used anymore.
uint64_t timeout_hint_us;
// If true and if user is trying to write to column families that don't exist
// (they were dropped), ignore the write (don't return an error). If there
// are multiple writes in a WriteBatch, other writes will succeed.
@ -1595,7 +1592,6 @@ struct WriteOptions {
WriteOptions()
: sync(false),
disableWAL(false),
timeout_hint_us(0),
ignore_missing_column_families(false),
no_slowdown(false) {}
};

Loading…
Cancel
Save