@tinycloud/replica 0.3.0-beta.5 → 0.3.0-beta.6
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/kv-storage.js +7 -6
- package/dist/kv-storage.js.map +1 -1
- package/dist/{kv-storage.worker.67e46cebbda277040312a770449123633491901d6cceacea95754a843e01e9c9.js → kv-storage.worker.f9311d47e8d4d08d5413987b5f8aa5e3cd180708f3e4debed3b0a3d938156fcd.js} +569 -561
- package/dist/kv-storage.worker.js +569 -561
- package/dist/kv-storage.worker.js.map +1 -1
- package/dist/replica.worker.js +563 -556
- package/dist/replica.worker.js.map +1 -1
- package/package.json +2 -2
package/dist/kv-storage.js
CHANGED
|
@@ -617,7 +617,7 @@ var ErrorCodes = {
|
|
|
617
617
|
PERMISSION_DENIED: "PERMISSION_DENIED",
|
|
618
618
|
// Node retry signals (tinycloud-node #347). `meta.retryable` says whether a
|
|
619
619
|
// retry is safe; `meta.retryAfterMs` carries the node's Retry-After.
|
|
620
|
-
/** HTTP 503 `sql_busy:<stage>` / `unavailable_retryable`: nothing was applied; retry after `meta.retryAfterMs`. */
|
|
620
|
+
/** HTTP 503 `sql_busy:<stage>` / `unavailable_retryable`/`read_audit_busy`: nothing was applied; retry after `meta.retryAfterMs`. */
|
|
621
621
|
NODE_BUSY: "NODE_BUSY",
|
|
622
622
|
/** HTTP 503 `request_timeout`: the node's deadline passed before any write began; nothing was applied. */
|
|
623
623
|
REQUEST_TIMEOUT: "REQUEST_TIMEOUT",
|
|
@@ -658,11 +658,12 @@ var ErrorCodes = {
|
|
|
658
658
|
DUCKDB_READONLY_VIOLATION: "DUCKDB_READONLY_VIOLATION"
|
|
659
659
|
};
|
|
660
660
|
var defaultRetryPolicy = {
|
|
661
|
-
maxAttempts:
|
|
661
|
+
maxAttempts: 4,
|
|
662
662
|
backoff: "exponential",
|
|
663
|
-
baseDelayMs:
|
|
664
|
-
maxDelayMs:
|
|
665
|
-
retryableErrors: [ErrorCodes.
|
|
663
|
+
baseDelayMs: 250,
|
|
664
|
+
maxDelayMs: 4e3,
|
|
665
|
+
retryableErrors: [ErrorCodes.NODE_BUSY, ErrorCodes.REQUEST_TIMEOUT],
|
|
666
|
+
maxTotalMs: 12e3
|
|
666
667
|
};
|
|
667
668
|
var grantableActions = new Set(
|
|
668
669
|
CAPABILITY_REGISTRY.map(({ urn }) => urn).filter((urn) => !urn.endsWith("/*"))
|
|
@@ -2130,7 +2131,7 @@ function spawn(source) {
|
|
|
2130
2131
|
if (source instanceof URL || typeof source === "string") return new Worker(source, { type: "module" });
|
|
2131
2132
|
if (typeof source === "function") return source();
|
|
2132
2133
|
}
|
|
2133
|
-
return new Worker(new URL("./kv-storage.worker.
|
|
2134
|
+
return new Worker(new URL("./kv-storage.worker.f9311d47e8d4d08d5413987b5f8aa5e3cd180708f3e4debed3b0a3d938156fcd.js", import.meta.url), { type: "module" });
|
|
2134
2135
|
}
|
|
2135
2136
|
var WorkerConnection = class {
|
|
2136
2137
|
ready;
|