rocksdb/util
Hui Xiao b25f2afeff Return Status::NotSupported() in RateLimiter::GetTotalPendingRequests default impl (#8950)
Summary:
Context:
After more discussion, a fix in https://github.com/facebook/rocksdb/issues/8938 might turn out to be too restrictive for the case where `GetTotalPendingRequests` might be invoked on RateLimiter classes that does not support the recently added API `RateLimiter::GetTotalPendingRequests` (https://github.com/facebook/rocksdb/issues/8890) due to the `assert(false)` in https://github.com/facebook/rocksdb/issues/8938. Furthermore, sentinel value like `-1` proposed in https://github.com/facebook/rocksdb/issues/8938 is easy to be ignored and unchecked. Therefore we decided to adopt `Status::NotSupported()`, which is also a convention of adding new API to public header in RocksDB.
- Changed return value type of  `RateLimiter::GetTotalPendingRequests` in related declaration/definition
- Passed in pointer argument to hold the output instead of returning it as before
- Adapted to the changes above in calling `RateLimiter::GetTotalPendingRequests` in test
- Minor improvement to `TEST_F(RateLimiterTest, GetTotalPendingRequests)`:  added failure message for assertion and replaced repetitive statements with a loop

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8950

Reviewed By: ajkr, pdillinger

Differential Revision: D31128450

Pulled By: hx235

fbshipit-source-id: 282ac9c4f3dacaa0aec6d0a993161f77ad47a040
2021-09-22 19:36:06 -07:00
..
aligned_buffer.h
autovector.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
autovector_test.cc Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
bloom_impl.h
bloom_test.cc
build_version.cc.in
cast_util.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
channel.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
coding.cc
coding.h
coding_lean.h
coding_test.cc
compaction_job_stats_impl.cc
comparator.cc
compression.h
compression_context_cache.cc
compression_context_cache.h
concurrent_task_limiter_impl.cc
concurrent_task_limiter_impl.h
core_local.h
crc32c.cc Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
crc32c.h
crc32c_arm64.cc
crc32c_arm64.h
crc32c_ppc.c
crc32c_ppc.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
crc32c_ppc_asm.S
crc32c_ppc_constants.h
crc32c_test.cc
defer.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
defer_test.cc
duplicate_detector.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
dynamic_bloom.cc
dynamic_bloom.h
dynamic_bloom_test.cc
fastrange.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
file_checksum_helper.cc
file_checksum_helper.h
file_reader_writer_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
filelock_test.cc
filter_bench.cc
gflags_compat.h
hash.cc Built-in support for generating unique IDs, bug fix (#8708) 2021-08-30 15:20:41 -07:00
hash.h Built-in support for generating unique IDs, bug fix (#8708) 2021-08-30 15:20:41 -07:00
hash128.h Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
hash_map.h
hash_test.cc Built-in support for generating unique IDs, bug fix (#8708) 2021-08-30 15:20:41 -07:00
heap.h
heap_test.cc
kv_map.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
log_write_bench.cc
math.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
math128.h
murmurhash.cc
murmurhash.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
mutexlock.h
ppc-opcode.h
random.cc
random.h
random_test.cc
rate_limiter.cc Add public API RateLimiter::GetTotalPendingRequests() (#8890) 2021-09-10 08:37:04 -07:00
rate_limiter.h Return Status::NotSupported() in RateLimiter::GetTotalPendingRequests default impl (#8950) 2021-09-22 19:36:06 -07:00
rate_limiter_test.cc Return Status::NotSupported() in RateLimiter::GetTotalPendingRequests default impl (#8950) 2021-09-22 19:36:06 -07:00
regex.cc Improve support for using regexes (#8740) 2021-09-07 13:05:23 -07:00
repeatable_thread.h
repeatable_thread_test.cc
ribbon_alg.h
ribbon_config.cc
ribbon_config.h
ribbon_impl.h Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
ribbon_test.cc Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
set_comparator.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
slice.cc
slice_test.cc Improve support for using regexes (#8740) 2021-09-07 13:05:23 -07:00
slice_transform_test.cc
status.cc
stderr_logger.h
stop_watch.h
string_util.cc Remove some unneeded code (#8736) 2021-09-01 14:28:58 -07:00
string_util.h Remove some unneeded code (#8736) 2021-09-01 14:28:58 -07:00
thread_guard.h
thread_list_test.cc
thread_local.cc
thread_local.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
thread_local_test.cc
thread_operation.h
threadpool_imp.cc
threadpool_imp.h
timer.h
timer_queue.h
timer_queue_test.cc
timer_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
user_comparator_wrapper.h
vector_iterator.h
work_queue.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
work_queue_test.cc
xxhash.cc Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
xxhash.h Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
xxph3.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00