콘텐츠로 이동
한국어

MongoStore

이 콘텐츠는 아직 번역되지 않았습니다.

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