mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-22 15:52:13 +00:00
Move `validate_enumerated_option`, `validate_positive_option`, and `validate_factor_option` into shared index option utilities under the `secondary_index::util` namespace. These functions were previously defined as file-local statics in `vector_index.cc` with hardcoded index names in error messages. The shared versions take `index_type_name` as a parameter, allowing each `custom_index` subclass to pass its own name via the virtual `index_type_name()` method at the call site. The options maps use `std::bind_front` to bind config params (supported values, limits), leaving `index_name` as the first unbound argument passed by `check_index_options()`. Add `index_type_name()` as a pure virtual method on `custom_index`. Move the shared utility implementations into `index_option_utils.cc` and update `vector_index.cc` to use them.
2.4 KiB
2.4 KiB