diff --git a/docs-src/docs/rx-storage-opfs.md b/docs-src/docs/rx-storage-opfs.md index 2d23144656a..4d89f920bbf 100644 --- a/docs-src/docs/rx-storage-opfs.md +++ b/docs-src/docs/rx-storage-opfs.md @@ -160,19 +160,6 @@ const storage = getRxStorageOPFS({ If you forget to set this and still create and use a [RxDatabase](./rx-database.md) inside of the worker, you might get the error message` or `Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')`. - -## Setting `jsonPositionSize` to increase the maximum database size. - -By default the `jsonPositionSize` value is set to `8` which allows the database to get up to 100 megabytes in size (per collection). -This is ok for most use cases but you might want to just increase `jsonPositionSize` to `14`. -In the next major RxDB version the default will be set to `14`, but this was not possible without introducing a breaking change. - -:::note -If you have already stored data, you cannot just change the `jsonPositionSize` value because your stored binary data will not be compatible anymore. - -Also there is a `opfs-big.worker.js` file that has `jsonPositionSize` set to `14` already. -::: - ## OPFS in Electron, React-Native or Capacitor.js Origin Private File System is a browser API that is only accessible in browsers. Other JavaScript like React-Native or Node.js, do not support it. diff --git a/src/rx-collection-helper.ts b/src/rx-collection-helper.ts index d9c123c61e4..a16c90dc6cf 100644 --- a/src/rx-collection-helper.ts +++ b/src/rx-collection-helper.ts @@ -133,7 +133,12 @@ export async function removeCollectionStorages( collectionName: row.collectionName, databaseInstanceToken, databaseName, - multiInstance: false, + /** + * multiInstance must be set to true, + * so that the storageInstance can inform other + * instances about being removed. + */ + multiInstance: true, options: {}, schema: row.schema, password,