@prisma/client-engine-runtime 7.2.0-integration-fix-sqlite-deadlock-fix.2 → 7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1
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/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -2043,14 +2043,16 @@ var TransactionManager = class {
|
|
|
2043
2043
|
const abortController = new AbortController();
|
|
2044
2044
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
2045
2045
|
startTimer?.unref?.();
|
|
2046
|
+
const startTransactionPromise = this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing);
|
|
2046
2047
|
transaction.transaction = await Promise.race([
|
|
2047
|
-
|
|
2048
|
+
startTransactionPromise.finally(() => clearTimeout(startTimer)),
|
|
2048
2049
|
once(abortController.signal, "abort").then(() => void 0)
|
|
2049
2050
|
]);
|
|
2050
2051
|
this.transactions.set(transaction.id, transaction);
|
|
2051
2052
|
switch (transaction.status) {
|
|
2052
2053
|
case "waiting":
|
|
2053
2054
|
if (abortController.signal.aborted) {
|
|
2055
|
+
void startTransactionPromise.then((tx) => tx.rollback()).catch((e) => debug("error in discarded transaction:", e));
|
|
2054
2056
|
await this.#closeTransaction(transaction, "timed_out");
|
|
2055
2057
|
throw new TransactionStartTimeoutError();
|
|
2056
2058
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1992,14 +1992,16 @@ var TransactionManager = class {
|
|
|
1992
1992
|
const abortController = new AbortController();
|
|
1993
1993
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
1994
1994
|
startTimer?.unref?.();
|
|
1995
|
+
const startTransactionPromise = this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing);
|
|
1995
1996
|
transaction.transaction = await Promise.race([
|
|
1996
|
-
|
|
1997
|
+
startTransactionPromise.finally(() => clearTimeout(startTimer)),
|
|
1997
1998
|
once(abortController.signal, "abort").then(() => void 0)
|
|
1998
1999
|
]);
|
|
1999
2000
|
this.transactions.set(transaction.id, transaction);
|
|
2000
2001
|
switch (transaction.status) {
|
|
2001
2002
|
case "waiting":
|
|
2002
2003
|
if (abortController.signal.aborted) {
|
|
2004
|
+
void startTransactionPromise.then((tx) => tx.rollback()).catch((e) => debug("error in discarded transaction:", e));
|
|
2003
2005
|
await this.#closeTransaction(transaction, "timed_out");
|
|
2004
2006
|
throw new TransactionStartTimeoutError();
|
|
2005
2007
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "7.2.0-integration-
|
|
3
|
+
"version": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"nanoid": "5.1.5",
|
|
31
31
|
"ulid": "3.0.0",
|
|
32
32
|
"uuid": "11.1.0",
|
|
33
|
-
"@prisma/client-runtime-utils": "7.2.0-integration-
|
|
34
|
-
"@prisma/
|
|
35
|
-
"@prisma/driver-adapter-utils": "7.2.0-integration-
|
|
36
|
-
"@prisma/
|
|
33
|
+
"@prisma/client-runtime-utils": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
34
|
+
"@prisma/sqlcommenter": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
35
|
+
"@prisma/driver-adapter-utils": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1",
|
|
36
|
+
"@prisma/debug": "7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jest": "29.5.14",
|