[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-typescript-core] branch master updated: idb-bridge: wait until no
From: |
Admin |
Subject: |
[taler-typescript-core] branch master updated: idb-bridge: wait until no transaction is active before exporting |
Date: |
Fri, 13 Jun 2025 00:07:26 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository taler-typescript-core.
The following commit(s) were added to refs/heads/master by this push:
new dbcc79e74 idb-bridge: wait until no transaction is active before
exporting
dbcc79e74 is described below
commit dbcc79e74e2d057595bd036b8f002f196f90d4f6
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Jun 13 00:07:22 2025 +0200
idb-bridge: wait until no transaction is active before exporting
---
packages/idb-bridge/src/SqliteBackend.ts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/packages/idb-bridge/src/SqliteBackend.ts
b/packages/idb-bridge/src/SqliteBackend.ts
index 10dd19956..2cc8d47f8 100644
--- a/packages/idb-bridge/src/SqliteBackend.ts
+++ b/packages/idb-bridge/src/SqliteBackend.ts
@@ -2122,10 +2122,17 @@ export class SqliteBackend implements Backend {
}
async backupToFile(path: string): Promise<void> {
+ // Wait until no other transaction is active.
+ while (this.txLevel !== TransactionLevel.None) {
+ await this.transactionDoneCond.wait();
+ }
+ this.txLevel = TransactionLevel.VersionChange;
const stmt = await this._prep("VACUUM INTO $filename;");
await stmt.run({
filename: path,
});
+ this.txLevel = TransactionLevel.None;
+ this.transactionDoneCond.trigger();
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-typescript-core] branch master updated: idb-bridge: wait until no transaction is active before exporting,
Admin <=