this change fixes the regression introduced by
ebf5e138e8, which
* initialized `truncate_timeout_in_ms` with
`counter_write_request_timeout_in_ms`,
* returns `cas_timeout_in_ms` in the place of
`other_timeout_in_ms`.
in this change, these two misconfigurations are fixed.
Fixes #13633
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
Closes #13639
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
/*
|
|
* Copyright (C) 2020-present ScyllaDB
|
|
*
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#include "timeout_config.hh"
|
|
#include "db/config.hh"
|
|
#include "db/timeout_clock.hh"
|
|
#include <chrono>
|
|
#include <seastar/core/future.hh>
|
|
|
|
using namespace std::chrono_literals;
|
|
|
|
updateable_timeout_config::updateable_timeout_config(const db::config& cfg)
|
|
: read_timeout_in_ms(cfg.read_request_timeout_in_ms)
|
|
, write_timeout_in_ms(cfg.write_request_timeout_in_ms)
|
|
, range_read_timeout_in_ms(cfg.range_request_timeout_in_ms)
|
|
, counter_write_timeout_in_ms(cfg.counter_write_request_timeout_in_ms)
|
|
, truncate_timeout_in_ms(cfg.truncate_request_timeout_in_ms)
|
|
, cas_timeout_in_ms(cfg.cas_contention_timeout_in_ms)
|
|
, other_timeout_in_ms(cfg.request_timeout_in_ms)
|
|
{}
|
|
|
|
timeout_config updateable_timeout_config::current_values() const {
|
|
return {
|
|
std::chrono::milliseconds(read_timeout_in_ms),
|
|
std::chrono::milliseconds(write_timeout_in_ms),
|
|
std::chrono::milliseconds(range_read_timeout_in_ms),
|
|
std::chrono::milliseconds(counter_write_timeout_in_ms),
|
|
std::chrono::milliseconds(truncate_timeout_in_ms),
|
|
std::chrono::milliseconds(cas_timeout_in_ms),
|
|
std::chrono::milliseconds(other_timeout_in_ms),
|
|
};
|
|
}
|