diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
| commit | 294bc6ecabf14c09c9bc8644704921dcf97cb44e (patch) | |
| tree | 279b1e0bab53901a1647ac63c1c724f0f789a663 /src/mongo/db/index/index_access_method.h | |
| parent | 70be7c27a251621187a1de533462ae2bb1e3bd39 (diff) | |
| parent | 1e917fd798aa25b7066d4b414b51184f13d5a092 (diff) | |
Update upstream source from tag 'upstream/6.0.10'debian/6.0.10-1
Update to upstream version '6.0.10'
with Debian dir 2d176fa254eee97b139f712fec5709641335a8c3
Diffstat (limited to 'src/mongo/db/index/index_access_method.h')
| -rw-r--r-- | src/mongo/db/index/index_access_method.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/mongo/db/index/index_access_method.h b/src/mongo/db/index/index_access_method.h index ad61cc5a25e..18d96a2218d 100644 --- a/src/mongo/db/index/index_access_method.h +++ b/src/mongo/db/index/index_access_method.h @@ -40,6 +40,7 @@ #include "mongo/db/jsobj.h" #include "mongo/db/operation_context.h" #include "mongo/db/record_id.h" +#include "mongo/db/sorter/sorter.h" #include "mongo/db/storage/sorted_data_interface.h" #include "mongo/db/yieldable.h" @@ -72,6 +73,9 @@ public: IndexAccessMethod() = default; virtual ~IndexAccessMethod() = default; + static std::unique_ptr<IndexAccessMethod> make( + IndexCatalogEntry* entry, std::unique_ptr<SortedDataInterface> sortedDataInterface); + /** * Equivalent to (but shorter and faster than): dynamic_cast<SortedDataIndexAccessMethod*>(this) */ @@ -185,7 +189,6 @@ public: */ virtual Status insert(OperationContext* opCtx, const CollectionPtr& collection, - SharedBufferFragmentBuilder& pooledBuilder, const BSONObj& obj, const RecordId& loc, const InsertDeleteOptions& options, @@ -218,6 +221,12 @@ public: * Persists on disk the keys that have been inserted using this BulkBuilder. */ virtual IndexStateInfo persistDataForShutdown() = 0; + + protected: + static void countNewBuildInStats(); + static void countResumedBuildInStats(); + static SorterFileStats* bulkBuilderFileStats(); + static SorterTracker* bulkBuilderTracker(); }; /** @@ -240,23 +249,6 @@ public: }; /** - * Factory class that constructs an IndexAccessMethod depending on the type of index. - */ -class IndexAccessMethodFactory { -public: - IndexAccessMethodFactory() = default; - virtual ~IndexAccessMethodFactory() = default; - - static IndexAccessMethodFactory* get(ServiceContext* service); - static IndexAccessMethodFactory* get(OperationContext* opCtx); - static void set(ServiceContext* service, - std::unique_ptr<IndexAccessMethodFactory> collectionFactory); - - virtual std::unique_ptr<IndexAccessMethod> make( - IndexCatalogEntry* entry, std::unique_ptr<SortedDataInterface> sortedDataInterface) = 0; -}; - -/** * Updates are two steps: verify that it's a valid update, and perform it. * prepareUpdate fills out the UpdateStatus and update actually applies it. */ |
