From 2e0159ec9e69dadca09e6a932ae1f7a8fdc9cf1b Mon Sep 17 00:00:00 2001 From: Yutian Li Date: Mon, 10 Feb 2020 12:31:12 -0800 Subject: [PATCH] Add error status for no_slowdown & low priority write (#6396) Summary: When `no_slowdown` is enabled, it returns `Status::Incomplete("Write stall")` if a stall would occur. This patch adds descriptive text for when `no_slowdown` and `low_pri` are enabled. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6396 Differential Revision: D19808978 Pulled By: cheng-chang fbshipit-source-id: a53b0d25ed414c821a086531e0222027f925e627 --- db/db_impl/db_impl_write.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_impl/db_impl_write.cc b/db/db_impl/db_impl_write.cc index ed089b01b..5bf008147 100644 --- a/db/db_impl/db_impl_write.cc +++ b/db/db_impl/db_impl_write.cc @@ -1458,7 +1458,7 @@ Status DBImpl::ThrottleLowPriWritesIfNeeded(const WriteOptions& write_options, return Status::OK(); } if (write_options.no_slowdown) { - return Status::Incomplete(); + return Status::Incomplete("Low priority write stall"); } else { assert(my_batch != nullptr); // Rate limit those writes. The reason that we don't completely wait