Bump ueberDB to get speed improvements

image-example
Richard Hansen 2021-01-11 03:47:55 -05:00 committed by John McLear
parent 481fa047e4
commit edbe6d5387
5 changed files with 22 additions and 18 deletions

View File

@ -1,3 +1,7 @@
# Changes for the next release
### Notable new features
* Database performance is significantly improved.
# 1.8.7 # 1.8.7
### Compatibility-breaking changes ### Compatibility-breaking changes
* **IMPORTANT:** It is no longer possible to protect a group pad with a * **IMPORTANT:** It is no longer possible to protect a group pad with a

View File

@ -57,7 +57,7 @@ require('ep_etherpad-lite/node_modules/npm').load({}, (er, npm) => {
process.stdout.write('\n'); process.stdout.write('\n');
process.stdout.write('done. waiting for db to finish transaction. depended on dbms this may take some time...\n'); process.stdout.write('done. waiting for db to finish transaction. depended on dbms this may take some time...\n');
db.doShutdown(() => { db.close(() => {
log(`finished, imported ${keyNo} keys.`); log(`finished, imported ${keyNo} keys.`);
process.exit(0); process.exit(0);
}); });

View File

@ -49,7 +49,7 @@ exports.init = async () => await new Promise((resolve, reject) => {
} }
// everything ok, set up Promise-based methods // everything ok, set up Promise-based methods
['get', 'set', 'findKeys', 'getSub', 'setSub', 'remove', 'doShutdown'].forEach((fn) => { ['get', 'set', 'findKeys', 'getSub', 'setSub', 'remove'].forEach((fn) => {
exports[fn] = util.promisify(db[fn].bind(db)); exports[fn] = util.promisify(db[fn].bind(db));
}); });
@ -73,6 +73,6 @@ exports.init = async () => await new Promise((resolve, reject) => {
}); });
exports.shutdown = async (hookName, context) => { exports.shutdown = async (hookName, context) => {
await exports.doShutdown(); await util.promisify(db.close.bind(db))();
console.log('Database closed'); console.log('Database closed');
}; };

28
src/package-lock.json generated
View File

@ -4179,9 +4179,9 @@
"dev": true "dev": true
}, },
"needle": { "needle": {
"version": "2.5.2", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz", "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
"integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==", "integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
"optional": true, "optional": true,
"requires": { "requires": {
"debug": "^3.2.6", "debug": "^3.2.6",
@ -4236,9 +4236,9 @@
} }
}, },
"node-addon-api": { "node-addon-api": {
"version": "2.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.0.tgz", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz",
"integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==", "integrity": "sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==",
"optional": true "optional": true
}, },
"node-environment-flags": { "node-environment-flags": {
@ -8858,12 +8858,12 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
}, },
"sqlite3": { "sqlite3": {
"version": "5.0.0", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.0.tgz", "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.1.tgz",
"integrity": "sha512-rjvqHFUaSGnzxDy2AHCwhHy6Zp6MNJzCPGYju4kD8yi6bze4d1/zMTg6C7JI49b7/EM7jKMTvyfN/4ylBKdwfw==", "integrity": "sha512-kh2lTIcYNfmVcvhVJihsYuPj9U0xzBbh6bmqILO2hkryWSC9RRhzYmkIDtJkJ+d8Kg4wZRJ0T1reyHUEspICfg==",
"optional": true, "optional": true,
"requires": { "requires": {
"node-addon-api": "2.0.0", "node-addon-api": "^3.0.0",
"node-gyp": "3.x", "node-gyp": "3.x",
"node-pre-gyp": "^0.11.0" "node-pre-gyp": "^0.11.0"
} }
@ -9358,9 +9358,9 @@
} }
}, },
"ueberdb2": { "ueberdb2": {
"version": "1.1.7", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/ueberdb2/-/ueberdb2-1.1.7.tgz", "resolved": "https://registry.npmjs.org/ueberdb2/-/ueberdb2-1.2.1.tgz",
"integrity": "sha512-Fxvpei4MVYOlCWZ67I5iibYyaHIb40ZLwN0OsjPEuMpcWYBXuwkl+svFyA2nYgk9/1Nk9eL/zdsXbwm7BLMKsg==", "integrity": "sha512-b1WeG5KinxddpFAkHcFJW5tDuoGMonI3AyZgqmmHKnvF7CJTprPX17n0AOi3iQcu97uoxz9nb56KEQ4gHQOCJQ==",
"requires": { "requires": {
"async": "^3.2.0", "async": "^3.2.0",
"cassandra-driver": "^4.5.1", "cassandra-driver": "^4.5.1",
@ -9371,7 +9371,7 @@
"elasticsearch": "^16.7.1", "elasticsearch": "^16.7.1",
"mocha": "^7.1.2", "mocha": "^7.1.2",
"mongodb": "^3.6.3", "mongodb": "^3.6.3",
"mssql": "7.0.0-alpha.4", "mssql": "^7.0.0-alpha.4",
"mysql": "2.18.1", "mysql": "2.18.1",
"nano": "^8.2.2", "nano": "^8.2.2",
"pg": "^8.0.3", "pg": "^8.0.3",

View File

@ -70,7 +70,7 @@
"threads": "^1.4.0", "threads": "^1.4.0",
"tiny-worker": "^2.3.0", "tiny-worker": "^2.3.0",
"tinycon": "0.0.1", "tinycon": "0.0.1",
"ueberdb2": "^1.1.7", "ueberdb2": "^1.2.1",
"underscore": "1.8.3", "underscore": "1.8.3",
"unorm": "1.4.1" "unorm": "1.4.1"
}, },