diff --git a/lib/Database.js b/lib/Database.js index 2c86319..8f5d7bc 100644 --- a/lib/Database.js +++ b/lib/Database.js @@ -138,6 +138,7 @@ export default class Database extends Events { this._db = open({ path: path.join(this.#path, this.#name), + sharedStructuresKey: Symbol.for('structures') }); this.#closed = false; diff --git a/lib/Thread.js b/lib/Thread.js index f2b70dd..b0d4fff 100644 --- a/lib/Thread.js +++ b/lib/Thread.js @@ -103,6 +103,7 @@ function startDb(dbpath, name, cache) { if(!db) { db = open({ path: path.join(dbpath, name), + sharedStructuresKey: Symbol.for('structures'), cache: cache }); virtualDB = new VirtualDatabase(db); diff --git a/package-lock.json b/package-lock.json index a466957..1f043a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "acorn": "^8.7.0", "axios": "^0.25.0", "fastify": "^3.27.0", - "lmdb": "^2.1.7", + "lmdb": "^2.2.0-beta1", "minimist": "^1.2.5", "nanoid": "^3.2.0", "threads": "^1.7.0", @@ -3215,16 +3215,16 @@ } }, "node_modules/lmdb": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.1.7.tgz", - "integrity": "sha512-i6EFEBBlQ130J4BfJUbYgZFKQDz83xhpM47vzs0BMpXiJ7D4NjecO1Y3X54D341dwkLmTphlIyro5nTkKFXoMQ==", + "version": "2.2.0-beta1", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.2.0-beta1.tgz", + "integrity": "sha512-vfTP63aD8lT3/+s4iq5w87BFdfd6toViNTygtEw83GrLITxD0e2U9cR71eTrLZ8hPdP7RnhR1ZEZQvkYA6tQsw==", "hasInstallScript": true, "dependencies": { - "msgpackr": "^1.5.2", + "msgpackr": "^1.5.3", "nan": "^2.14.2", "node-gyp-build": "^4.2.3", - "ordered-binary": "^1.2.3", - "weak-lru-cache": "^1.2.1" + "ordered-binary": "^1.2.4", + "weak-lru-cache": "^1.2.2" } }, "node_modules/locate-path": { @@ -3645,9 +3645,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/msgpackr": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.5.2.tgz", - "integrity": "sha512-OCguCkbG34x1ddO4vAzEm/4J1GTo512k9SoxV8K+EGfI/onFdpemRf0HpsVRFpxadXr4JBFgHsQUitgTlw7ZYQ==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.5.3.tgz", + "integrity": "sha512-dk5SjZyq2ntujAR49SZFjc44Oa4kfzP+VePyqrRCqYSY24qJfnJBvduxp4oJrHONLaE29IjuX1r9a9DsReDNUQ==", "optionalDependencies": { "msgpackr-extract": "^1.0.14" } @@ -3954,9 +3954,9 @@ } }, "node_modules/ordered-binary": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.2.3.tgz", - "integrity": "sha512-fEwMk8TNUtzQDjXKYS2ANW3fNZ/gMReCPOAsLHaqw+UDnq/8ddXAcX4lGRpTK7kAghAjkmJs1EXXbcrDbg+ruw==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.2.4.tgz", + "integrity": "sha512-A/csN0d3n+igxBPfUrjbV5GC69LWj2pjZzAAeeHXLukQ4+fytfP4T1Lg0ju7MSPSwq7KtHkGaiwO8URZN5IpLg==" }, "node_modules/org-regex": { "version": "1.0.0", @@ -5728,9 +5728,9 @@ } }, "node_modules/weak-lru-cache": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.1.tgz", - "integrity": "sha512-O5ag1F0Xk6ui+Fg5LlosTcVAyHs6DeyiDDbOapNtFCx/KjZ82B3U9stM9hvzbVclKWn9ABPjaINX/nQkGkJkKg==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==" }, "node_modules/webidl-conversions": { "version": "3.0.1", @@ -8407,15 +8407,15 @@ } }, "lmdb": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.1.7.tgz", - "integrity": "sha512-i6EFEBBlQ130J4BfJUbYgZFKQDz83xhpM47vzs0BMpXiJ7D4NjecO1Y3X54D341dwkLmTphlIyro5nTkKFXoMQ==", + "version": "2.2.0-beta1", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.2.0-beta1.tgz", + "integrity": "sha512-vfTP63aD8lT3/+s4iq5w87BFdfd6toViNTygtEw83GrLITxD0e2U9cR71eTrLZ8hPdP7RnhR1ZEZQvkYA6tQsw==", "requires": { - "msgpackr": "^1.5.2", + "msgpackr": "^1.5.3", "nan": "^2.14.2", "node-gyp-build": "^4.2.3", - "ordered-binary": "^1.2.3", - "weak-lru-cache": "^1.2.1" + "ordered-binary": "^1.2.4", + "weak-lru-cache": "^1.2.2" } }, "locate-path": { @@ -8731,9 +8731,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "msgpackr": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.5.2.tgz", - "integrity": "sha512-OCguCkbG34x1ddO4vAzEm/4J1GTo512k9SoxV8K+EGfI/onFdpemRf0HpsVRFpxadXr4JBFgHsQUitgTlw7ZYQ==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.5.3.tgz", + "integrity": "sha512-dk5SjZyq2ntujAR49SZFjc44Oa4kfzP+VePyqrRCqYSY24qJfnJBvduxp4oJrHONLaE29IjuX1r9a9DsReDNUQ==", "requires": { "msgpackr-extract": "^1.0.14" } @@ -8960,9 +8960,9 @@ } }, "ordered-binary": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.2.3.tgz", - "integrity": "sha512-fEwMk8TNUtzQDjXKYS2ANW3fNZ/gMReCPOAsLHaqw+UDnq/8ddXAcX4lGRpTK7kAghAjkmJs1EXXbcrDbg+ruw==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.2.4.tgz", + "integrity": "sha512-A/csN0d3n+igxBPfUrjbV5GC69LWj2pjZzAAeeHXLukQ4+fytfP4T1Lg0ju7MSPSwq7KtHkGaiwO8URZN5IpLg==" }, "org-regex": { "version": "1.0.0", @@ -10276,9 +10276,9 @@ "integrity": "sha512-LuCAHZN75H9tdrAiLFf030oW7nJV5xwNMuk1ymOZwopmuK3d2H4L1Kv4+GFHgarKiLfXXLFU+7LDABHnwOkWng==" }, "weak-lru-cache": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.1.tgz", - "integrity": "sha512-O5ag1F0Xk6ui+Fg5LlosTcVAyHs6DeyiDDbOapNtFCx/KjZ82B3U9stM9hvzbVclKWn9ABPjaINX/nQkGkJkKg==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==" }, "webidl-conversions": { "version": "3.0.1", diff --git a/package.json b/package.json index 561b723..afec02e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "acorn": "^8.7.0", "axios": "^0.25.0", "fastify": "^3.27.0", - "lmdb": "^2.1.7", + "lmdb": "^2.2.0-beta1", "minimist": "^1.2.5", "nanoid": "^3.2.0", "threads": "^1.7.0",