velocious 1.0.569 → 1.0.570
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/README.md +12 -2
- package/build/database/drivers/base.js +82 -44
- package/build/database/operation-connection.js +11 -0
- package/build/database/operation.js +10 -0
- package/build/src/database/drivers/base.d.ts +30 -3
- package/build/src/database/drivers/base.d.ts.map +1 -1
- package/build/src/database/drivers/base.js +78 -42
- package/build/src/database/operation-connection.d.ts +6 -0
- package/build/src/database/operation-connection.d.ts.map +1 -1
- package/build/src/database/operation-connection.js +10 -1
- package/build/src/database/operation.d.ts +8 -0
- package/build/src/database/operation.d.ts.map +1 -1
- package/build/src/database/operation.js +10 -1
- package/package.json +1 -1
- package/src/database/drivers/base.js +82 -44
- package/src/database/operation-connection.js +11 -0
- package/src/database/operation.js +10 -0
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* In-process driver schema metadata caching (see [docs/schema-metadata-cache.md](docs/schema-metadata-cache.md))
|
|
35
35
|
* Planned local-first shared-resource sync architecture (see [docs/offline-sync.md](docs/offline-sync.md))
|
|
36
36
|
* Selective named database connection checkouts, bounded pool waits, and debugging held connections (see [docs/database-connections.md](docs/database-connections.md))
|
|
37
|
-
* Explicit singular-database operation transactions whose model scopes preserve ownership through records, relationships, lifecycle work, nested savepoints, and commit callbacks (see [docs/operation-scoped-transactions.md](docs/operation-scoped-transactions.md))
|
|
37
|
+
* Explicit singular-database operation transactions whose model scopes preserve ownership through records, relationships, lifecycle work, nested savepoints, pre-commit guards, and commit callbacks (see [docs/operation-scoped-transactions.md](docs/operation-scoped-transactions.md))
|
|
38
38
|
* AbortSignal-driven MySQL/MariaDB query cancellation for raw, model, and cross-tenant aggregate queries (see [docs/database-query-cancellation.md](docs/database-query-cancellation.md))
|
|
39
39
|
* Optional built-in debug endpoint for inspecting server and database connection state (see [docs/debug-endpoint.md](docs/debug-endpoint.md))
|
|
40
40
|
* Optional built-in API manifest endpoint describing every registered frontend-model resource as human- and machine-readable JSON (see [docs/api-manifest-endpoint.md](docs/api-manifest-endpoint.md))
|
|
@@ -63,13 +63,23 @@ await configuration.withTransaction({databaseIdentifier: "default", name: "accep
|
|
|
63
63
|
ticket.setAccepted(true)
|
|
64
64
|
await ticket.save()
|
|
65
65
|
|
|
66
|
+
await operation.beforeCommit(async ({operation: guardedOperation}) => {
|
|
67
|
+
const currentTicket = await guardedOperation
|
|
68
|
+
.forModel(Ticket)
|
|
69
|
+
.findByOrFail({id: ticketId})
|
|
70
|
+
|
|
71
|
+
if (!currentTicket.acceptanceStillOwnedBy(workerId)) {
|
|
72
|
+
throw new Error("Ticket acceptance ownership changed")
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
|
|
66
76
|
await operation.afterCommit(async () => {
|
|
67
77
|
await publishAcceptedTicket(ticket.id())
|
|
68
78
|
})
|
|
69
79
|
})
|
|
70
80
|
```
|
|
71
81
|
|
|
72
|
-
Use operation-bound model scopes and their loaded records throughout the callback. `operation.transaction` adds a nested savepoint, and `operation.connection()` is the deliberate escape hatch for owned raw SQL. Cross-database models, same-identifier tenant switches to another physical database, and operation handles used after the callback are rejected. On shared SQLite/SQL.js pools, unrelated work waits for the operation lease, while admission during an already-open ordinary transaction is rejected. See [operation-scoped transactions](docs/operation-scoped-transactions.md) for pool
|
|
82
|
+
Use operation-bound model scopes and their loaded records throughout the callback. `operation.beforeCommit` runs a final operation-owned guard after callback success but before outer commit or nested savepoint release; a rejection rolls back that frame. `operation.transaction` adds a nested savepoint, and `operation.connection()` is the deliberate escape hatch for owned raw SQL. Cross-database models, same-identifier tenant switches to another physical database, and operation handles used after the callback are rejected. On shared SQLite/SQL.js pools, unrelated work waits for the operation lease, while admission during an already-open ordinary transaction is rejected. See [operation-scoped transactions](docs/operation-scoped-transactions.md) for guard, pool, after-commit failure, and migration semantics.
|
|
73
83
|
|
|
74
84
|
# Development
|
|
75
85
|
|
|
@@ -42,6 +42,12 @@
|
|
|
42
42
|
* @typedef {Record<string, ?>} QueryRowType
|
|
43
43
|
* @typedef {Array<QueryRowType>} QueryResultType
|
|
44
44
|
*/
|
|
45
|
+
/**
|
|
46
|
+
* TransactionCallbackFrame type.
|
|
47
|
+
* @typedef {object} TransactionCallbackFrame
|
|
48
|
+
* @property {Array<() => void | Promise<void>>} afterCommitCallbacks - Callbacks to merge or run after commit.
|
|
49
|
+
* @property {Array<() => void | Promise<void>>} beforeCommitCallbacks - Guards to run before this frame completes.
|
|
50
|
+
*/
|
|
45
51
|
/**
|
|
46
52
|
* RetryableDatabaseErrorResult type.
|
|
47
53
|
* @typedef {object} RetryableDatabaseErrorResult
|
|
@@ -171,8 +177,8 @@ export default class VelociousDatabaseDriversBase {
|
|
|
171
177
|
idSeq = undefined
|
|
172
178
|
/**
|
|
173
179
|
* Narrows the runtime value to the documented type.
|
|
174
|
-
* @type {
|
|
175
|
-
|
|
180
|
+
* @type {TransactionCallbackFrame[]} */
|
|
181
|
+
_transactionCallbackFrames
|
|
176
182
|
/**
|
|
177
183
|
* Narrows the runtime value to the documented type.
|
|
178
184
|
* @type {Map<string, Promise<?>>} */
|
|
@@ -207,7 +213,7 @@ export default class VelociousDatabaseDriversBase {
|
|
|
207
213
|
this.configuration = configuration
|
|
208
214
|
this.mutex = new Mutex() // Can be used to lock this instance for exclusive use
|
|
209
215
|
this.logger = new Logger(this)
|
|
210
|
-
this.
|
|
216
|
+
this._transactionCallbackFrames = []
|
|
211
217
|
this._transactionsCount = 0
|
|
212
218
|
this._transactionsActionsMutex = new Mutex()
|
|
213
219
|
this._schemaCache = new Map()
|
|
@@ -1068,14 +1074,15 @@ export default class VelociousDatabaseDriversBase {
|
|
|
1068
1074
|
*/
|
|
1069
1075
|
async _runTransactionAttempt(callback, options) {
|
|
1070
1076
|
const savePointName = this.generateSavePointName()
|
|
1071
|
-
/**
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1077
|
+
/** @type {TransactionCallbackFrame} */
|
|
1078
|
+
const callbackFrame = {
|
|
1079
|
+
afterCommitCallbacks: [],
|
|
1080
|
+
beforeCommitCallbacks: []
|
|
1081
|
+
}
|
|
1075
1082
|
let transactionStarted = false
|
|
1076
1083
|
let savePointStarted = false
|
|
1077
1084
|
|
|
1078
|
-
this.
|
|
1085
|
+
this._transactionCallbackFrames.push(callbackFrame)
|
|
1079
1086
|
|
|
1080
1087
|
try {
|
|
1081
1088
|
if (this._transactionsCount == 0) {
|
|
@@ -1088,7 +1095,7 @@ export default class VelociousDatabaseDriversBase {
|
|
|
1088
1095
|
savePointStarted = true
|
|
1089
1096
|
}
|
|
1090
1097
|
} catch (error) {
|
|
1091
|
-
this.
|
|
1098
|
+
this._transactionCallbackFrames.pop()
|
|
1092
1099
|
throw error
|
|
1093
1100
|
}
|
|
1094
1101
|
|
|
@@ -1096,6 +1103,7 @@ export default class VelociousDatabaseDriversBase {
|
|
|
1096
1103
|
|
|
1097
1104
|
try {
|
|
1098
1105
|
result = await callback()
|
|
1106
|
+
await this._runBeforeCommitCallbacks(callbackFrame)
|
|
1099
1107
|
|
|
1100
1108
|
if (savePointStarted) {
|
|
1101
1109
|
this.logger.debug("Release savepoint", savePointName)
|
|
@@ -1113,42 +1121,44 @@ export default class VelociousDatabaseDriversBase {
|
|
|
1113
1121
|
this.logger.debug("Transaction error", error)
|
|
1114
1122
|
}
|
|
1115
1123
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1124
|
+
try {
|
|
1125
|
+
let transactionRolledBack = false
|
|
1126
|
+
|
|
1127
|
+
if (savePointStarted) {
|
|
1128
|
+
this.logger.debug("Rollback savepoint", savePointName)
|
|
1129
|
+
try {
|
|
1130
|
+
await this.rollbackSavePoint(savePointName, options)
|
|
1131
|
+
} catch (savePointError) {
|
|
1132
|
+
const message = savePointError instanceof Error ? savePointError.message : `${savePointError}`
|
|
1133
|
+
|
|
1134
|
+
// MySQL sometimes drops savepoints unexpectedly; fall back to rolling back the full transaction
|
|
1135
|
+
if (message.includes("SAVEPOINT") || message.includes("ER_SP_DOES_NOT_EXIST")) {
|
|
1136
|
+
this.logger.debug("Savepoint rollback failed; rolling back entire transaction instead")
|
|
1137
|
+
await this.rollbackTransaction(options)
|
|
1138
|
+
transactionRolledBack = true
|
|
1139
|
+
} else {
|
|
1140
|
+
throw savePointError
|
|
1141
|
+
}
|
|
1132
1142
|
}
|
|
1133
1143
|
}
|
|
1134
|
-
}
|
|
1135
1144
|
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1145
|
+
// Only roll back if a transaction is still open. A nested savepoint whose rollback failed
|
|
1146
|
+
// falls back to rolling back the whole transaction (above), which already closed it and
|
|
1147
|
+
// dropped the count to 0; rolling back again here would issue a second ROLLBACK and drive
|
|
1148
|
+
// `_transactionsCount` below zero, which would then defeat the outermost deadlock-retry guard.
|
|
1149
|
+
if (transactionStarted && !transactionRolledBack && this._transactionsCount > 0) {
|
|
1150
|
+
this.logger.debug("Rollback transaction")
|
|
1151
|
+
await this.rollbackTransaction(options)
|
|
1152
|
+
}
|
|
1153
|
+
} finally {
|
|
1154
|
+
this._transactionCallbackFrames.pop()
|
|
1143
1155
|
}
|
|
1144
1156
|
|
|
1145
|
-
this._afterCommitCallbackFrames.pop()
|
|
1146
|
-
|
|
1147
1157
|
throw error
|
|
1148
1158
|
}
|
|
1149
1159
|
|
|
1150
1160
|
try {
|
|
1151
|
-
await this.
|
|
1161
|
+
await this._commitTransactionCallbackFrame()
|
|
1152
1162
|
} catch (error) {
|
|
1153
1163
|
throw new VelociousDatabaseAfterCommitCallbackError(error)
|
|
1154
1164
|
}
|
|
@@ -1156,6 +1166,23 @@ export default class VelociousDatabaseDriversBase {
|
|
|
1156
1166
|
return result
|
|
1157
1167
|
}
|
|
1158
1168
|
|
|
1169
|
+
/**
|
|
1170
|
+
* Registers a guard to run after the current transaction callback succeeds and before its
|
|
1171
|
+
* outer commit or nested savepoint release.
|
|
1172
|
+
* @param {() => void | Promise<void>} callback - Guard callback.
|
|
1173
|
+
* @param {Pick<QueryOptions, "operationOwner">} [options] - Callback ownership.
|
|
1174
|
+
* @returns {Promise<void>} - Resolves when the guard has been registered.
|
|
1175
|
+
*/
|
|
1176
|
+
async beforeCommit(callback, options = {}) {
|
|
1177
|
+
await this._waitForOperationLease(options.operationOwner)
|
|
1178
|
+
|
|
1179
|
+
const currentFrame = this._transactionCallbackFrames[this._transactionCallbackFrames.length - 1]
|
|
1180
|
+
|
|
1181
|
+
if (!currentFrame) throw new Error("beforeCommit requires an active transaction")
|
|
1182
|
+
|
|
1183
|
+
currentFrame.beforeCommitCallbacks.push(callback)
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1159
1186
|
/**
|
|
1160
1187
|
* Runs a callback after the surrounding transaction commits.
|
|
1161
1188
|
* If no transaction is active, the callback runs immediately.
|
|
@@ -1166,14 +1193,14 @@ export default class VelociousDatabaseDriversBase {
|
|
|
1166
1193
|
async afterCommit(callback, options = {}) {
|
|
1167
1194
|
await this._waitForOperationLease(options.operationOwner)
|
|
1168
1195
|
|
|
1169
|
-
const currentFrame = this.
|
|
1196
|
+
const currentFrame = this._transactionCallbackFrames[this._transactionCallbackFrames.length - 1]
|
|
1170
1197
|
|
|
1171
1198
|
if (!currentFrame) {
|
|
1172
1199
|
await callback()
|
|
1173
1200
|
return
|
|
1174
1201
|
}
|
|
1175
1202
|
|
|
1176
|
-
currentFrame.push(callback)
|
|
1203
|
+
currentFrame.afterCommitCallbacks.push(callback)
|
|
1177
1204
|
}
|
|
1178
1205
|
|
|
1179
1206
|
/**
|
|
@@ -1240,23 +1267,34 @@ export default class VelociousDatabaseDriversBase {
|
|
|
1240
1267
|
await this.query("COMMIT", options)
|
|
1241
1268
|
}
|
|
1242
1269
|
|
|
1270
|
+
/**
|
|
1271
|
+
* Runs every guard registered to the transaction frame.
|
|
1272
|
+
* @param {TransactionCallbackFrame} callbackFrame - Frame whose guards are completing.
|
|
1273
|
+
* @returns {Promise<void>} - Resolves when every guard accepts the commit.
|
|
1274
|
+
*/
|
|
1275
|
+
async _runBeforeCommitCallbacks(callbackFrame) {
|
|
1276
|
+
for (const callback of callbackFrame.beforeCommitCallbacks) {
|
|
1277
|
+
await callback()
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1243
1281
|
/**
|
|
1244
1282
|
* Merges committed callbacks into the parent transaction frame or runs them when the outermost commit completes.
|
|
1245
1283
|
* @returns {Promise<void>} - Resolves when complete.
|
|
1246
1284
|
*/
|
|
1247
|
-
async
|
|
1248
|
-
const
|
|
1285
|
+
async _commitTransactionCallbackFrame() {
|
|
1286
|
+
const committedFrame = this._transactionCallbackFrames.pop()
|
|
1249
1287
|
|
|
1250
|
-
if (!
|
|
1288
|
+
if (!committedFrame || committedFrame.afterCommitCallbacks.length === 0) return
|
|
1251
1289
|
|
|
1252
|
-
const parentFrame = this.
|
|
1290
|
+
const parentFrame = this._transactionCallbackFrames[this._transactionCallbackFrames.length - 1]
|
|
1253
1291
|
|
|
1254
1292
|
if (parentFrame) {
|
|
1255
|
-
parentFrame.push(...
|
|
1293
|
+
parentFrame.afterCommitCallbacks.push(...committedFrame.afterCommitCallbacks)
|
|
1256
1294
|
return
|
|
1257
1295
|
}
|
|
1258
1296
|
|
|
1259
|
-
for (const callback of
|
|
1297
|
+
for (const callback of committedFrame.afterCommitCallbacks) {
|
|
1260
1298
|
await callback()
|
|
1261
1299
|
}
|
|
1262
1300
|
}
|
|
@@ -87,6 +87,17 @@ export default class VelociousDatabaseOperationConnection {
|
|
|
87
87
|
return /** @type {Promise<T>} */ (this._physicalConnection.transaction(callback, {operationOwner: this._owner}))
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Registers an operation-owned before-commit guard.
|
|
92
|
+
* @param {() => void | Promise<void>} callback - Guard callback.
|
|
93
|
+
* @returns {Promise<void>} - Resolves after registration.
|
|
94
|
+
*/
|
|
95
|
+
async beforeCommit(callback) {
|
|
96
|
+
this._operation.assertActive()
|
|
97
|
+
|
|
98
|
+
await this._physicalConnection.beforeCommit(callback, {operationOwner: this._owner})
|
|
99
|
+
}
|
|
100
|
+
|
|
90
101
|
/**
|
|
91
102
|
* Registers an operation-owned after-commit callback.
|
|
92
103
|
* @param {() => void | Promise<void>} callback - Callback.
|
|
@@ -85,6 +85,16 @@ export default class VelociousDatabaseOperation {
|
|
|
85
85
|
await this.connection().afterCommit(callback)
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Registers a guard owned by the current transaction/savepoint frame.
|
|
90
|
+
* @param {(context: {operation: VelociousDatabaseOperation}) => void | Promise<void>} callback - Guard callback.
|
|
91
|
+
* @returns {Promise<void>} - Resolves after registration.
|
|
92
|
+
*/
|
|
93
|
+
async beforeCommit(callback) {
|
|
94
|
+
this.assertActive()
|
|
95
|
+
await this.connection().beforeCommit(() => callback({operation: this}))
|
|
96
|
+
}
|
|
97
|
+
|
|
88
98
|
/**
|
|
89
99
|
* Runs a nested operation transaction/savepoint.
|
|
90
100
|
* @template T
|
|
@@ -11,8 +11,8 @@ export default class VelociousDatabaseDriversBase {
|
|
|
11
11
|
idSeq: number | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Narrows the runtime value to the documented type.
|
|
14
|
-
* @type {
|
|
15
|
-
|
|
14
|
+
* @type {TransactionCallbackFrame[]} */
|
|
15
|
+
_transactionCallbackFrames: TransactionCallbackFrame[];
|
|
16
16
|
/**
|
|
17
17
|
* Narrows the runtime value to the documented type.
|
|
18
18
|
* @type {Map<string, Promise<?>>} */
|
|
@@ -480,6 +480,14 @@ export default class VelociousDatabaseDriversBase {
|
|
|
480
480
|
* @returns {Promise<?>} - Resolves with the transaction result.
|
|
481
481
|
*/
|
|
482
482
|
_runTransactionAttempt<T>(callback: () => Promise<T>, options: Pick<QueryOptions, "operationOwner">): Promise<unknown>;
|
|
483
|
+
/**
|
|
484
|
+
* Registers a guard to run after the current transaction callback succeeds and before its
|
|
485
|
+
* outer commit or nested savepoint release.
|
|
486
|
+
* @param {() => void | Promise<void>} callback - Guard callback.
|
|
487
|
+
* @param {Pick<QueryOptions, "operationOwner">} [options] - Callback ownership.
|
|
488
|
+
* @returns {Promise<void>} - Resolves when the guard has been registered.
|
|
489
|
+
*/
|
|
490
|
+
beforeCommit(callback: () => void | Promise<void>, options?: Pick<QueryOptions, "operationOwner">): Promise<void>;
|
|
483
491
|
/**
|
|
484
492
|
* Runs a callback after the surrounding transaction commits.
|
|
485
493
|
* If no transaction is active, the callback runs immediately.
|
|
@@ -517,11 +525,17 @@ export default class VelociousDatabaseDriversBase {
|
|
|
517
525
|
* @returns {Promise<void>} - Resolves when complete.
|
|
518
526
|
*/
|
|
519
527
|
_commitTransactionAction(options?: Pick<QueryOptions, "operationOwner">): Promise<void>;
|
|
528
|
+
/**
|
|
529
|
+
* Runs every guard registered to the transaction frame.
|
|
530
|
+
* @param {TransactionCallbackFrame} callbackFrame - Frame whose guards are completing.
|
|
531
|
+
* @returns {Promise<void>} - Resolves when every guard accepts the commit.
|
|
532
|
+
*/
|
|
533
|
+
_runBeforeCommitCallbacks(callbackFrame: TransactionCallbackFrame): Promise<void>;
|
|
520
534
|
/**
|
|
521
535
|
* Merges committed callbacks into the parent transaction frame or runs them when the outermost commit completes.
|
|
522
536
|
* @returns {Promise<void>} - Resolves when complete.
|
|
523
537
|
*/
|
|
524
|
-
|
|
538
|
+
_commitTransactionCallbackFrame(): Promise<void>;
|
|
525
539
|
/**
|
|
526
540
|
* Streams the rows of `sql` one at a time instead of buffering the whole result set, so a
|
|
527
541
|
* caller can process an arbitrarily large result with bounded memory. This base implementation
|
|
@@ -978,6 +992,19 @@ export type QueryRowType = Record<string, unknown>;
|
|
|
978
992
|
* QueryRowType type.
|
|
979
993
|
*/
|
|
980
994
|
export type QueryResultType = Array<QueryRowType>;
|
|
995
|
+
/**
|
|
996
|
+
* TransactionCallbackFrame type.
|
|
997
|
+
*/
|
|
998
|
+
export type TransactionCallbackFrame = {
|
|
999
|
+
/**
|
|
1000
|
+
* - Callbacks to merge or run after commit.
|
|
1001
|
+
*/
|
|
1002
|
+
afterCommitCallbacks: Array<() => void | Promise<void>>;
|
|
1003
|
+
/**
|
|
1004
|
+
* - Guards to run before this frame completes.
|
|
1005
|
+
*/
|
|
1006
|
+
beforeCommitCallbacks: Array<() => void | Promise<void>>;
|
|
1007
|
+
};
|
|
981
1008
|
/**
|
|
982
1009
|
* RetryableDatabaseErrorResult type.
|
|
983
1010
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/database/drivers/base.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/database/drivers/base.js"],"names":[],"mappings":"AA4KA;IAiCE;;;;OAIG;IACH,oBAHW,OAAO,8BAA8B,EAAE,yBAAyB,iBAChE,OAAO,wBAAwB,EAAE,OAAO,EAWlD;IA9CD;;oCAEgC;IAChC,OADU,MAAM,GAAG,SAAS,CACX;IACjB;;4CAEwC;IACxC,4BADU,wBAAwB,EAAE,CACV;IAC1B;;yCAEqC;IACrC,cADU,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAC,CAAC,CAAC,CACrB;IACZ;;0CAEsC;IACtC,yBADU,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CACX;IACvB;;oCAEgC;IAChC,yBADU,MAAM,GAAG,SAAS,CACL;IACvB;;yCAEqC;IACrC,cADU,gBAAgB,GAAG,IAAI,CACd;IACnB,kCAAkC;IAClC,oBADW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CACA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