tradeblocks-mcp 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-O6FQQRJV.js → chunk-UGHXXLLR.js} +15 -11
- package/dist/{chunk-O6FQQRJV.js.map → chunk-UGHXXLLR.js.map} +1 -1
- package/dist/{sync-AAV7BGOE.js → sync-OPFBFM2P.js} +2 -2
- package/dist/test-exports.js +1 -1
- package/package.json +1 -1
- package/server/{chunk-TDKK4QFM.js → chunk-RM33HDCX.js} +15 -11
- package/server/{chunk-TDKK4QFM.js.map → chunk-RM33HDCX.js.map} +1 -1
- package/server/index.js +3 -3
- package/server/{sync-T6GEBPJ7.js → sync-R3W6AELJ.js} +2 -2
- /package/dist/{sync-AAV7BGOE.js.map → sync-OPFBFM2P.js.map} +0 -0
- /package/server/{sync-T6GEBPJ7.js.map → sync-R3W6AELJ.js.map} +0 -0
|
@@ -807,14 +807,18 @@ async function getConnection(dataDir) {
|
|
|
807
807
|
if (isLockError(errorMessage)) {
|
|
808
808
|
const recovered = await tryRecoverLockByTerminatingStaleProcess(errorMessage, dbPath, forceRecovery);
|
|
809
809
|
if (recovered) {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
810
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
811
|
+
await new Promise((r) => setTimeout(r, 500 * (attempt + 1)));
|
|
812
|
+
try {
|
|
813
|
+
return await openReadWriteConnection(dbPath, threads, memoryLimit);
|
|
814
|
+
} catch (retryError) {
|
|
815
|
+
const retryMsg = retryError instanceof Error ? retryError.message : String(retryError);
|
|
816
|
+
if (attempt < 2 && isLockError(retryMsg)) continue;
|
|
817
|
+
resetConnectionState();
|
|
818
|
+
throw new Error(
|
|
819
|
+
`Failed to initialize DuckDB at ${dbPath} after lock recovery: ${retryMsg}`
|
|
820
|
+
);
|
|
821
|
+
}
|
|
818
822
|
}
|
|
819
823
|
}
|
|
820
824
|
}
|
|
@@ -857,8 +861,8 @@ async function closeConnection() {
|
|
|
857
861
|
async function upgradeToReadWrite(dataDir, options) {
|
|
858
862
|
if (connectionMode === "read_write" && connection) return connection;
|
|
859
863
|
await closeConnection();
|
|
860
|
-
const maxRetries =
|
|
861
|
-
const retryDelayMs =
|
|
864
|
+
const maxRetries = 4;
|
|
865
|
+
const retryDelayMs = 1e3;
|
|
862
866
|
let lastError = null;
|
|
863
867
|
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
864
868
|
try {
|
|
@@ -22770,4 +22774,4 @@ decimal.js/decimal.mjs:
|
|
|
22770
22774
|
* MIT Licence
|
|
22771
22775
|
*)
|
|
22772
22776
|
*/
|
|
22773
|
-
//# sourceMappingURL=chunk-
|
|
22777
|
+
//# sourceMappingURL=chunk-UGHXXLLR.js.map
|