You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fixes#94
- Follows on from share/sharedb#657
This change is to work alongside upstream work to remove ShareDB's
usage of `getCommittedOpVersion()`.
In `sharedb-mongo` this function requires an entire extra op index,
just to handle a corner case where two `create` ops are submitted at the
same time, which should happen relatively infrequently.
This change allows consumers to opt out of individual indexes. For
example, if we're not using `getCommittedOpVersion()`, consumers can
opt out of the automatic `src`/`seq`/`v` index creation with:
```js
new ShareDbMongo(
mongoUrl,
{
disableIndexCreation: {
src_seq_v: true,
},
},
);
```
Note that if this index already exists, consumers will need to manually
remove it.
Previous behaviour will still work, so setting:
```js
new ShareDbMongo(
mongoUrl,
{
disableIndexCreation: true,
},
);
```
disables **all** index creation.
0 commit comments