Aller au contenu
Français

MongoStore

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: src/persistence/journals/MongoStore.ts:31

The MongoDB half of the store lifecycle: LazyStore handles lazy connection, one-shot preparation and ownership-aware teardown, and this layer supplies index creation as the preparation step.

Index creation is not cosmetic here the way CREATE INDEX often is. The journal’s unique compound index on (persistenceId, sequenceNr) is the optimistic-concurrency backstop — without it a racing writer silently overwrites, exactly the failure the relational backends get for free from a primary key. autoCreateIndexes: false therefore means “I have created them myself”, not “I don’t need them”, and the docs say so.

close(): Promise<void>

Defined in: src/persistence/LazyStore.ts:66

Promise<void>

LazyStore.close