From 77589d4cc82b766d2cf16294fab98a57f6579cb4 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Thu, 16 Jan 2025 13:18:37 -0500 Subject: Additional layout policies + more flexibility in buffer flushing --- include/framework/DynamicExtension.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/framework/DynamicExtension.h') diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h index c35bb93..5a64243 100644 --- a/include/framework/DynamicExtension.h +++ b/include/framework/DynamicExtension.h @@ -248,6 +248,19 @@ public: return t; } + /** + * Get the number of non-empty shards within the index. + * + * @return The number of non-empty shards within the index + */ + size_t get_shard_count() { + auto epoch = get_active_epoch(); + auto s = epoch->get_structure()->get_shard_count(); + end_job(epoch); + + return s; + } + /** * Get the number of bytes of memory allocated across the framework for * storing records and associated index information (i.e., internal -- cgit v1.2.3