[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-wallet-webex] 03/10: only invoke afterCommitCallback
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-wallet-webex] 03/10: only invoke afterCommitCallback for transactions that change data |
Date: |
Sat, 17 Aug 2019 01:54:36 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-webex.
commit 262885679cd8bedaa7b99aab5432daf7bf514a05
Author: Florian Dold <address@hidden>
AuthorDate: Fri Aug 16 22:35:44 2019 +0200
only invoke afterCommitCallback for transactions that change data
---
packages/idb-bridge/src/MemoryBackend.ts | 5 +++--
packages/idb-bridge/tsconfig.json | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/packages/idb-bridge/src/MemoryBackend.ts
b/packages/idb-bridge/src/MemoryBackend.ts
index e09a2898..4154435a 100644
--- a/packages/idb-bridge/src/MemoryBackend.ts
+++ b/packages/idb-bridge/src/MemoryBackend.ts
@@ -1416,7 +1416,8 @@ export class MemoryBackend implements Backend {
if (!db) {
throw Error("db not found");
}
- if (db.txLevel < TransactionLevel.Read) {
+ const txLevel = db.txLevel;
+ if (txLevel < TransactionLevel.Read) {
throw Error("only allowed while running a transaction");
}
@@ -1455,7 +1456,7 @@ export class MemoryBackend implements Backend {
delete this.connectionsByTransaction[btx.transactionCookie];
this.transactionDoneCond.trigger();
- if (this.afterCommitCallback) {
+ if (this.afterCommitCallback && txLevel >= TransactionLevel.Write) {
await this.afterCommitCallback();
}
}
diff --git a/packages/idb-bridge/tsconfig.json
b/packages/idb-bridge/tsconfig.json
index d3a746e1..017afdae 100644
--- a/packages/idb-bridge/tsconfig.json
+++ b/packages/idb-bridge/tsconfig.json
@@ -9,7 +9,8 @@
"noEmitOnError": true,
"strict": true,
"incremental": true,
- "sourceMap": true
+ "sourceMap": true,
+ "types": []
},
"include": ["src/**/*"]
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [taler-wallet-webex] branch master updated (67dc8d30 -> 43cccf2c), gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 02/10: move selenium to contrib, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 03/10: only invoke afterCommitCallback for transactions that change data,
gnunet <=
- [GNUnet-SVN] [taler-wallet-webex] 04/10: bump idb-bridge version, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 10/10: idb-bridge: version bump, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 08/10: idb-bridge: fix bug in index deletion, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 05/10: do not ignore database version, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 06/10: version bump / imports, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 09/10: start with an actual wallet cli, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 07/10: idb-bridge: indexes belong to object stores, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 01/10: use packaged type declarations, gnunet, 2019/08/16