mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-25 01:02:20 +00:00
vector-search: reset DNS timeout after changing host
The vector-search client in ScyllaDB limits itself to doing one DNS
lookup per 5 seconds. However, when the configuration changes to point
to a different host, the DNS lookup should happen immediately, and
this patch makes it do that.
Before this patch,
test/cqlpy/run test_vector_search_with_vector_store_mock.py
Takes a whopping 34 seconds, more than 4 seconds per test!
The problem is that each test creates a new mock vector-store server
and reconfigures Scylla, and when reconfiguring Scylla nothing happens
until the 5-second clock runs out.
After this patch, the same test run is down to 5 seconds.
Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This commit is contained in:
@@ -41,6 +41,7 @@ public:
|
||||
void hosts(std::vector<seastar::sstring> hosts) {
|
||||
_addresses.clear();
|
||||
_hosts = std::move(hosts);
|
||||
_last_refresh = {}; // reset throttle so the refresh happens immediately
|
||||
trigger_refresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user