From f590ee2b7e2a24ff6a0883e41255e5eeaa5235ad Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Mon, 6 Apr 2026 11:45:35 +0300 Subject: [PATCH] cdc, vector: fix CDC result tracker for vector indexes When a table has a vector index, cdc::cdc_enabled() returns true because vector index writes are implemented via the CDC augmentation path. However, register_cdc_operation_result_tracker() was checking only cdc_options().enabled(), which is false for tables that have a vector index but not traditional CDC. As a result, the operation_result_tracker was never attached to write response handlers for vector-indexed tables. This tracker was added in commit 1b92cbe, and its job is to update metrics of CDC operations, and since vector search really does use CDC under the hood, these metrics could be useful when diagnosing problems. Fix by using cdc::cdc_enabled() instead of cdc_options().enabled(), which covers both traditional CDC and vector-indexed tables. Signed-off-by: Nadav Har'El Closes scylladb/scylladb#29343 --- service/storage_proxy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index d11acc9ffa..12bf055f80 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -3900,7 +3900,7 @@ void storage_proxy::register_cdc_operation_result_tracker(const storage_proxy::u for (auto& id : ids) { auto& h = get_write_response_handler(id.id); - if (h->get_schema()->cdc_options().enabled()) { + if (cdc::cdc_enabled(*h->get_schema())) { h->set_cdc_operation_result_tracker(tracker); } }