velocious 1.0.510 → 1.0.511

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.
@@ -0,0 +1,192 @@
1
+ // @ts-check
2
+
3
+ import timeout from "awaitery/build/timeout.js"
4
+
5
+ /**
6
+ * Thrown when an advisory lock could not be acquired before `timeoutMs` elapsed.
7
+ */
8
+ class AdvisoryLockTimeoutError extends Error {
9
+ /**
10
+ * Runs constructor.
11
+ * @param {string} message - Error message.
12
+ * @param {{name: string}} args - The advisory lock name that timed out.
13
+ */
14
+ constructor(message, {name}) {
15
+ super(message)
16
+ this.name = "AdvisoryLockTimeoutError"
17
+ this.lockName = name
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Thrown when `withAdvisoryLockOrFail` finds the lock already held.
23
+ */
24
+ class AdvisoryLockBusyError extends Error {
25
+ /**
26
+ * Runs constructor.
27
+ * @param {string} message - Error message.
28
+ * @param {{name: string}} args - The advisory lock name that was already held.
29
+ */
30
+ constructor(message, {name}) {
31
+ super(message)
32
+ this.name = "AdvisoryLockBusyError"
33
+ this.lockName = name
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Thrown when a callback holds an advisory lock longer than `holdTimeoutMs`.
39
+ */
40
+ class AdvisoryLockHoldTimeoutError extends Error {
41
+ /**
42
+ * Runs constructor.
43
+ * @param {string} message - Error message.
44
+ * @param {{name: string}} args - The advisory lock name whose hold timed out.
45
+ */
46
+ constructor(message, {name}) {
47
+ super(message)
48
+ this.name = "AdvisoryLockHoldTimeoutError"
49
+ this.lockName = name
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Runs advisory locks on the caller connection by default, using a dedicated
55
+ * lock connection only when a positive hold timeout needs separate ownership.
56
+ */
57
+ export default class AdvisoryLockRunner {
58
+ /**
59
+ * Creates an advisory-lock runner for one model database identifier.
60
+ * @param {{configuration: import("../configuration.js").default, connectionProvider: () => import("./drivers/base.js").default, databaseIdentifier: string}} args - Runner dependencies.
61
+ */
62
+ constructor({configuration, connectionProvider, databaseIdentifier}) {
63
+ this.configuration = configuration
64
+ this.connectionProvider = connectionProvider
65
+ this.databaseIdentifier = databaseIdentifier
66
+ }
67
+
68
+ /**
69
+ * Runs a callback after acquiring the advisory lock, waiting up to `timeoutMs`.
70
+ * @template T
71
+ * @param {string} name - Lock name.
72
+ * @param {() => Promise<T>} callback - Callback to invoke while the lock is held.
73
+ * @param {{timeoutMs?: number | null, holdTimeoutMs?: number | null}} [args] - Lock and hold timeout options.
74
+ * @returns {Promise<T>} - Resolves with the callback result.
75
+ */
76
+ async withAdvisoryLock(name, callback, args = {}) {
77
+ return await this.withLockConnection(args.holdTimeoutMs, async (connection) => {
78
+ const acquired = await connection.acquireAdvisoryLock(name, args)
79
+
80
+ if (!acquired) {
81
+ throw new AdvisoryLockTimeoutError(`Timed out waiting for advisory lock ${JSON.stringify(name)}`, {name})
82
+ }
83
+
84
+ return await this.runLockedCallback({callback, connection, holdTimeoutMs: args.holdTimeoutMs, name})
85
+ })
86
+ }
87
+
88
+ /**
89
+ * Runs a callback only if the advisory lock can be acquired immediately.
90
+ * @template T
91
+ * @param {string} name - Lock name.
92
+ * @param {() => Promise<T>} callback - Callback to invoke while the lock is held.
93
+ * @param {{holdTimeoutMs?: number | null}} [args] - Hold timeout options.
94
+ * @returns {Promise<T>} - Resolves with the callback result.
95
+ */
96
+ async withAdvisoryLockOrFail(name, callback, args = {}) {
97
+ return await this.withLockConnection(args.holdTimeoutMs, async (connection) => {
98
+ const acquired = await connection.tryAcquireAdvisoryLock(name)
99
+
100
+ if (!acquired) {
101
+ throw new AdvisoryLockBusyError(`Advisory lock ${JSON.stringify(name)} is already held`, {name})
102
+ }
103
+
104
+ return await this.runLockedCallback({callback, connection, holdTimeoutMs: args.holdTimeoutMs, name})
105
+ })
106
+ }
107
+
108
+ /**
109
+ * Runs the lock holder callback and releases the lock from its owning connection.
110
+ * @template T
111
+ * @param {{callback: () => Promise<T>, connection: import("./drivers/base.js").default, holdTimeoutMs?: number | null, name: string}} args - Locked callback args.
112
+ * @returns {Promise<T>} - Resolves with the callback result.
113
+ */
114
+ async runLockedCallback({callback, connection, holdTimeoutMs, name}) {
115
+ try {
116
+ return await AdvisoryLockRunner.runWithAdvisoryLockHoldTimeout(name, callback, holdTimeoutMs)
117
+ } finally {
118
+ await connection.releaseAdvisoryLock(name)
119
+ }
120
+ }
121
+
122
+ /**
123
+ * Runs lock work on the caller connection unless a positive hold timeout needs
124
+ * its own lock connection.
125
+ * @template T
126
+ * @param {number | null | undefined} holdTimeoutMs - Max hold time; positive values use a dedicated lock connection.
127
+ * @param {(connection: import("./drivers/base.js").default) => Promise<T>} callback - Callback receiving the connection that owns the advisory lock.
128
+ * @returns {Promise<T>} - Resolves with the callback result.
129
+ */
130
+ async withLockConnection(holdTimeoutMs, callback) {
131
+ if (holdTimeoutMs && holdTimeoutMs > 0) {
132
+ return await this.withDedicatedConnection(callback)
133
+ }
134
+
135
+ return await callback(this.connectionProvider())
136
+ }
137
+
138
+ /**
139
+ * Spawns a hold-timeout lock connection and closes it after lock work completes when
140
+ * the spawned driver owns the underlying physical connection.
141
+ * @template T
142
+ * @param {(connection: import("./drivers/base.js").default) => Promise<T>} callback - Callback that receives the dedicated lock connection.
143
+ * @returns {Promise<T>} - Resolves with the callback result.
144
+ */
145
+ async withDedicatedConnection(callback) {
146
+ const connection = await this.configuration.getDatabasePool(this.databaseIdentifier).spawnConnection()
147
+
148
+ try {
149
+ return await callback(connection)
150
+ } finally {
151
+ if (!connection.getArgs().getConnection) {
152
+ await connection.close()
153
+ }
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Runs `callback`, rejecting with `AdvisoryLockHoldTimeoutError` if it has
159
+ * not settled within `holdTimeoutMs`. The callback is not cancelled; callers
160
+ * use a dedicated advisory-lock connection so the lock can still be released.
161
+ * @template T
162
+ * @param {string} name - Lock name (for the error message).
163
+ * @param {() => Promise<T>} callback - Callback holding the lock.
164
+ * @param {number | null} [holdTimeoutMs] - Max hold time; falsy disables the timeout.
165
+ * @returns {Promise<T>} - Resolves with the callback result.
166
+ */
167
+ static async runWithAdvisoryLockHoldTimeout(name, callback, holdTimeoutMs) {
168
+ if (!holdTimeoutMs || holdTimeoutMs <= 0) {
169
+ return await callback()
170
+ }
171
+
172
+ let callbackSettled = false
173
+
174
+ try {
175
+ return await timeout({timeout: holdTimeoutMs}, async () => {
176
+ try {
177
+ return await callback()
178
+ } finally {
179
+ callbackSettled = true
180
+ }
181
+ })
182
+ } catch (error) {
183
+ if (!callbackSettled) {
184
+ throw new AdvisoryLockHoldTimeoutError(`Advisory lock ${JSON.stringify(name)} held longer than ${holdTimeoutMs}ms`, {name})
185
+ }
186
+
187
+ throw error
188
+ }
189
+ }
190
+ }
191
+
192
+ export {AdvisoryLockBusyError, AdvisoryLockHoldTimeoutError, AdvisoryLockTimeoutError}
@@ -31,6 +31,9 @@ import Update from "./sql/update.js"
31
31
  const MYSQL_INDEFINITE_LOCK_TIMEOUT_SECONDS = 60 * 60 * 24 * 365
32
32
 
33
33
  export default class VelociousDatabaseDriversMysql extends Base{
34
+ /** @type {import("mysql").Pool | undefined} */
35
+ pool = undefined
36
+
34
37
  /** @type {string | null} */
35
38
  _desiredSessionTimeZone = "+00:00"
36
39
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  /** @typedef {import("../../configuration-types.js").TenantDatabaseProviderType} TenantDatabaseProviderType */
26
26
 
27
- import timeout from "awaitery/build/timeout.js"
27
+ import AdvisoryLockRunner, {AdvisoryLockBusyError, AdvisoryLockHoldTimeoutError, AdvisoryLockTimeoutError} from "../advisory-lock-runner.js"
28
28
  import BelongsToInstanceRelationship from "./instance-relationships/belongs-to.js"
29
29
  import BelongsToRelationship from "./relationships/belongs-to.js"
30
30
  import Configuration from "../../configuration.js"
@@ -164,60 +164,6 @@ function buildRelatedRecordWithInverse(parent, relationshipName, attributes, all
164
164
  return record
165
165
  }
166
166
 
167
- /**
168
- * Thrown by `Record.withAdvisoryLock` when the caller supplied a
169
- * `timeoutMs` and the lock was not granted before it elapsed.
170
- */
171
- class AdvisoryLockTimeoutError extends Error {
172
- /**
173
- * Runs constructor.
174
- * @param {string} message - Error message.
175
- * @param {{name: string}} args - The advisory lock name that timed out.
176
- */
177
- constructor(message, {name}) {
178
- super(message)
179
- this.name = "AdvisoryLockTimeoutError"
180
- this.lockName = name
181
- }
182
- }
183
-
184
- /**
185
- * Thrown by `Record.withAdvisoryLockOrFail` when the lock is already held
186
- * by another session at the moment of the call.
187
- */
188
- class AdvisoryLockBusyError extends Error {
189
- /**
190
- * Runs constructor.
191
- * @param {string} message - Error message.
192
- * @param {{name: string}} args - The advisory lock name that was already held.
193
- */
194
- constructor(message, {name}) {
195
- super(message)
196
- this.name = "AdvisoryLockBusyError"
197
- this.lockName = name
198
- }
199
- }
200
-
201
- /**
202
- * Thrown by `Record.withAdvisoryLock` / `withAdvisoryLockOrFail` when the
203
- * caller supplied a `holdTimeoutMs` and the callback ran longer than it. The
204
- * lock is released before this is thrown, so a hung holder can't block other
205
- * sessions indefinitely. Note: the callback itself is not cancelled — pass an
206
- * AbortSignal to the work if it needs to stop.
207
- */
208
- class AdvisoryLockHoldTimeoutError extends Error {
209
- /**
210
- * Runs constructor.
211
- * @param {string} message - Error message.
212
- * @param {{name: string}} args - The advisory lock name whose hold timed out.
213
- */
214
- constructor(message, {name}) {
215
- super(message)
216
- this.name = "AdvisoryLockHoldTimeoutError"
217
- this.lockName = name
218
- }
219
- }
220
-
221
167
  class TenantDatabaseScopeError extends Error {
222
168
  /**
223
169
  * Runs constructor.
@@ -2675,10 +2621,13 @@ class VelociousDatabaseRecord {
2675
2621
  }
2676
2622
 
2677
2623
  /**
2678
- * Runs the callback while holding a named advisory lock on the current
2679
- * connection. Advisory locks are cooperative and connection-scoped: they
2680
- * serialize callers that opt into the same `name`, without touching row
2681
- * or table locks, so unrelated traffic is free to proceed.
2624
+ * Runs the callback while holding a named advisory lock. Calls without
2625
+ * a positive `holdTimeoutMs` use the caller connection; calls with a positive
2626
+ * `holdTimeoutMs` use a dedicated lock connection so timeout cleanup can
2627
+ * release the lock even when callback database work is stuck. Advisory locks
2628
+ * are cooperative and session-scoped: they serialize callers that opt into
2629
+ * the same `name`, without touching row or table locks, so unrelated traffic
2630
+ * is free to proceed.
2682
2631
  *
2683
2632
  * The lock is acquired before the callback runs and released in a
2684
2633
  * `finally` block afterwards, so the callback's return value is
@@ -2694,18 +2643,13 @@ class VelociousDatabaseRecord {
2694
2643
  static async withAdvisoryLock(name, callback, args = {}) {
2695
2644
  await this.ensureInitialized()
2696
2645
 
2697
- const connection = this.connection()
2698
- const acquired = await connection.acquireAdvisoryLock(name, args)
2699
-
2700
- if (!acquired) {
2701
- throw new AdvisoryLockTimeoutError(`Timed out waiting for advisory lock ${JSON.stringify(name)}`, {name})
2702
- }
2646
+ const runner = new AdvisoryLockRunner({
2647
+ configuration: this._getConfiguration(),
2648
+ connectionProvider: () => this.connection(),
2649
+ databaseIdentifier: this.getDatabaseIdentifier()
2650
+ })
2703
2651
 
2704
- try {
2705
- return await this.runWithAdvisoryLockHoldTimeout(name, callback, args.holdTimeoutMs)
2706
- } finally {
2707
- await connection.releaseAdvisoryLock(name)
2708
- }
2652
+ return await runner.withAdvisoryLock(name, callback, args)
2709
2653
  }
2710
2654
 
2711
2655
  /**
@@ -2725,31 +2669,19 @@ class VelociousDatabaseRecord {
2725
2669
  static async withAdvisoryLockOrFail(name, callback, args = {}) {
2726
2670
  await this.ensureInitialized()
2727
2671
 
2728
- const connection = this.connection()
2729
- const acquired = await connection.tryAcquireAdvisoryLock(name)
2730
-
2731
- if (!acquired) {
2732
- throw new AdvisoryLockBusyError(`Advisory lock ${JSON.stringify(name)} is already held`, {name})
2733
- }
2672
+ const runner = new AdvisoryLockRunner({
2673
+ configuration: this._getConfiguration(),
2674
+ connectionProvider: () => this.connection(),
2675
+ databaseIdentifier: this.getDatabaseIdentifier()
2676
+ })
2734
2677
 
2735
- try {
2736
- return await this.runWithAdvisoryLockHoldTimeout(name, callback, args.holdTimeoutMs)
2737
- } finally {
2738
- await connection.releaseAdvisoryLock(name)
2739
- }
2678
+ return await runner.withAdvisoryLockOrFail(name, callback, args)
2740
2679
  }
2741
2680
 
2742
2681
  /**
2743
2682
  * Runs `callback`, rejecting with `AdvisoryLockHoldTimeoutError` if it has
2744
- * not settled within `holdTimeoutMs`. The caller's `finally` then releases
2745
- * the lock, so a hung holder can't block other sessions forever. The
2746
- * callback is not cancelled — this is a safety net, not cancellation.
2747
- *
2748
- * Uses `awaitery`'s shared `timeout` helper for the hard timeout, then
2749
- * translates its timeout into the typed `AdvisoryLockHoldTimeoutError` so
2750
- * callers can catch it like the other advisory-lock errors. A `callbackSettled`
2751
- * flag distinguishes the timeout from a rejection thrown by the callback
2752
- * itself, which is rethrown unchanged.
2683
+ * not settled within `holdTimeoutMs`. The callback is not cancelled — this is
2684
+ * a safety net, not cancellation.
2753
2685
  * @template T
2754
2686
  * @param {string} name - Lock name (for the error message).
2755
2687
  * @param {() => Promise<T>} callback - Callback holding the lock.
@@ -2757,27 +2689,7 @@ class VelociousDatabaseRecord {
2757
2689
  * @returns {Promise<T>}
2758
2690
  */
2759
2691
  static async runWithAdvisoryLockHoldTimeout(name, callback, holdTimeoutMs) {
2760
- if (!holdTimeoutMs || holdTimeoutMs <= 0) {
2761
- return await callback()
2762
- }
2763
-
2764
- let callbackSettled = false
2765
-
2766
- try {
2767
- return await timeout({timeout: holdTimeoutMs}, async () => {
2768
- try {
2769
- return await callback()
2770
- } finally {
2771
- callbackSettled = true
2772
- }
2773
- })
2774
- } catch (error) {
2775
- if (!callbackSettled) {
2776
- throw new AdvisoryLockHoldTimeoutError(`Advisory lock ${JSON.stringify(name)} held longer than ${holdTimeoutMs}ms`, {name})
2777
- }
2778
-
2779
- throw error
2780
- }
2692
+ return await AdvisoryLockRunner.runWithAdvisoryLockHoldTimeout(name, callback, holdTimeoutMs)
2781
2693
  }
2782
2694
 
2783
2695
  /**
@@ -775,7 +775,7 @@ export type DatabaseConfigurationType = {
775
775
  /**
776
776
  * - Database type identifier.
777
777
  */
778
- type?: "sqlite" | "pgsql" | "mysql" | "mssql" | undefined;
778
+ type?: "sqlite" | "mysql" | "pgsql" | "mssql" | undefined;
779
779
  /**
780
780
  * - Database to switch to after connecting.
781
781
  */
@@ -383,7 +383,7 @@ export default class VelociousConfiguration {
383
383
  * @returns {typeof import("./database/pool/base.js").default} - The database pool type.
384
384
  */
385
385
  getDatabasePoolType(identifier?: string): typeof import("./database/pool/base.js").default;
386
- getDatabaseType(identifier?: string): "sqlite" | "pgsql" | "mysql" | "mssql";
386
+ getDatabaseType(identifier?: string): "sqlite" | "mysql" | "pgsql" | "mssql";
387
387
  /**
388
388
  * Runs get directory.
389
389
  * @returns {string} - The directory.
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Runs advisory locks on the caller connection by default, using a dedicated
3
+ * lock connection only when a positive hold timeout needs separate ownership.
4
+ */
5
+ export default class AdvisoryLockRunner {
6
+ /**
7
+ * Runs `callback`, rejecting with `AdvisoryLockHoldTimeoutError` if it has
8
+ * not settled within `holdTimeoutMs`. The callback is not cancelled; callers
9
+ * use a dedicated advisory-lock connection so the lock can still be released.
10
+ * @template T
11
+ * @param {string} name - Lock name (for the error message).
12
+ * @param {() => Promise<T>} callback - Callback holding the lock.
13
+ * @param {number | null} [holdTimeoutMs] - Max hold time; falsy disables the timeout.
14
+ * @returns {Promise<T>} - Resolves with the callback result.
15
+ */
16
+ static runWithAdvisoryLockHoldTimeout<T>(name: string, callback: () => Promise<T>, holdTimeoutMs?: number | null): Promise<T>;
17
+ /**
18
+ * Creates an advisory-lock runner for one model database identifier.
19
+ * @param {{configuration: import("../configuration.js").default, connectionProvider: () => import("./drivers/base.js").default, databaseIdentifier: string}} args - Runner dependencies.
20
+ */
21
+ constructor({ configuration, connectionProvider, databaseIdentifier }: {
22
+ configuration: import("../configuration.js").default;
23
+ connectionProvider: () => import("./drivers/base.js").default;
24
+ databaseIdentifier: string;
25
+ });
26
+ configuration: import("../configuration.js").default;
27
+ connectionProvider: () => import("./drivers/base.js").default;
28
+ databaseIdentifier: string;
29
+ /**
30
+ * Runs a callback after acquiring the advisory lock, waiting up to `timeoutMs`.
31
+ * @template T
32
+ * @param {string} name - Lock name.
33
+ * @param {() => Promise<T>} callback - Callback to invoke while the lock is held.
34
+ * @param {{timeoutMs?: number | null, holdTimeoutMs?: number | null}} [args] - Lock and hold timeout options.
35
+ * @returns {Promise<T>} - Resolves with the callback result.
36
+ */
37
+ withAdvisoryLock<T>(name: string, callback: () => Promise<T>, args?: {
38
+ timeoutMs?: number | null;
39
+ holdTimeoutMs?: number | null;
40
+ }): Promise<T>;
41
+ /**
42
+ * Runs a callback only if the advisory lock can be acquired immediately.
43
+ * @template T
44
+ * @param {string} name - Lock name.
45
+ * @param {() => Promise<T>} callback - Callback to invoke while the lock is held.
46
+ * @param {{holdTimeoutMs?: number | null}} [args] - Hold timeout options.
47
+ * @returns {Promise<T>} - Resolves with the callback result.
48
+ */
49
+ withAdvisoryLockOrFail<T>(name: string, callback: () => Promise<T>, args?: {
50
+ holdTimeoutMs?: number | null;
51
+ }): Promise<T>;
52
+ /**
53
+ * Runs the lock holder callback and releases the lock from its owning connection.
54
+ * @template T
55
+ * @param {{callback: () => Promise<T>, connection: import("./drivers/base.js").default, holdTimeoutMs?: number | null, name: string}} args - Locked callback args.
56
+ * @returns {Promise<T>} - Resolves with the callback result.
57
+ */
58
+ runLockedCallback<T>({ callback, connection, holdTimeoutMs, name }: {
59
+ callback: () => Promise<T>;
60
+ connection: import("./drivers/base.js").default;
61
+ holdTimeoutMs?: number | null;
62
+ name: string;
63
+ }): Promise<T>;
64
+ /**
65
+ * Runs lock work on the caller connection unless a positive hold timeout needs
66
+ * its own lock connection.
67
+ * @template T
68
+ * @param {number | null | undefined} holdTimeoutMs - Max hold time; positive values use a dedicated lock connection.
69
+ * @param {(connection: import("./drivers/base.js").default) => Promise<T>} callback - Callback receiving the connection that owns the advisory lock.
70
+ * @returns {Promise<T>} - Resolves with the callback result.
71
+ */
72
+ withLockConnection<T>(holdTimeoutMs: number | null | undefined, callback: (connection: import("./drivers/base.js").default) => Promise<T>): Promise<T>;
73
+ /**
74
+ * Spawns a hold-timeout lock connection and closes it after lock work completes when
75
+ * the spawned driver owns the underlying physical connection.
76
+ * @template T
77
+ * @param {(connection: import("./drivers/base.js").default) => Promise<T>} callback - Callback that receives the dedicated lock connection.
78
+ * @returns {Promise<T>} - Resolves with the callback result.
79
+ */
80
+ withDedicatedConnection<T>(callback: (connection: import("./drivers/base.js").default) => Promise<T>): Promise<T>;
81
+ }
82
+ /**
83
+ * Thrown when `withAdvisoryLockOrFail` finds the lock already held.
84
+ */
85
+ export class AdvisoryLockBusyError extends Error {
86
+ /**
87
+ * Runs constructor.
88
+ * @param {string} message - Error message.
89
+ * @param {{name: string}} args - The advisory lock name that was already held.
90
+ */
91
+ constructor(message: string, { name }: {
92
+ name: string;
93
+ });
94
+ lockName: string;
95
+ }
96
+ /**
97
+ * Thrown when a callback holds an advisory lock longer than `holdTimeoutMs`.
98
+ */
99
+ export class AdvisoryLockHoldTimeoutError extends Error {
100
+ /**
101
+ * Runs constructor.
102
+ * @param {string} message - Error message.
103
+ * @param {{name: string}} args - The advisory lock name whose hold timed out.
104
+ */
105
+ constructor(message: string, { name }: {
106
+ name: string;
107
+ });
108
+ lockName: string;
109
+ }
110
+ /**
111
+ * Thrown when an advisory lock could not be acquired before `timeoutMs` elapsed.
112
+ */
113
+ export class AdvisoryLockTimeoutError extends Error {
114
+ /**
115
+ * Runs constructor.
116
+ * @param {string} message - Error message.
117
+ * @param {{name: string}} args - The advisory lock name that timed out.
118
+ */
119
+ constructor(message: string, { name }: {
120
+ name: string;
121
+ });
122
+ lockName: string;
123
+ }
124
+ //# sourceMappingURL=advisory-lock-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advisory-lock-runner.d.ts","sourceRoot":"","sources":["../../../src/database/advisory-lock-runner.js"],"names":[],"mappings":"AAoDA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