From 3b44f88a89e2283a0dd1a9a522e755899b2439f8 Mon Sep 17 00:00:00 2001 From: ethanglaser Date: Fri, 11 Sep 2026 14:04:54 -0700 Subject: [PATCH] fix another ABI break --- include/svs/orchestrators/vamana.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/include/svs/orchestrators/vamana.h b/include/svs/orchestrators/vamana.h index 6b4c04228..c79fb170f 100644 --- a/include/svs/orchestrators/vamana.h +++ b/include/svs/orchestrators/vamana.h @@ -50,9 +50,6 @@ class VamanaInterface { virtual size_t get_graph_max_degree() const = 0; - ///// Memory accounting - virtual svs::index::vamana::MemoryBreakdown get_memory_breakdown() const = 0; - virtual void set_construction_window_size(size_t window_size) = 0; virtual size_t get_construction_window_size() const = 0; @@ -104,6 +101,12 @@ class VamanaInterface { // Non-templated virtual method for distance calculation virtual double get_distance(size_t id, const AnonymousArray<1>& query) const = 0; + + ///// Memory accounting + // New virtuals belong at the end of the interface: inserting one shifts every + // later vtable slot, and a consumer built against the old header then dispatches + // through the wrong slot with no link-time diagnostic. + virtual svs::index::vamana::MemoryBreakdown get_memory_breakdown() const = 0; }; template @@ -130,10 +133,6 @@ class VamanaImpl : public manager::ManagerImpl { size_t get_graph_max_degree() const override { return impl().get_graph_max_degree(); } - svs::index::vamana::MemoryBreakdown get_memory_breakdown() const override { - return impl().get_memory_breakdown(); - } - void set_construction_window_size(size_t window_size) override { impl().set_construction_window_size(window_size); } @@ -274,6 +273,11 @@ class VamanaImpl : public manager::ManagerImpl { } ); } + + ///// Memory accounting + svs::index::vamana::MemoryBreakdown get_memory_breakdown() const override { + return impl().get_memory_breakdown(); + } }; ///// Forward declarations