diff options
author | Caleb Ristvedt <caleb.ristvedt@cune.org> | 2020-06-01 22:15:21 -0500 |
---|---|---|
committer | Caleb Ristvedt <caleb.ristvedt@cune.org> | 2020-06-10 21:54:35 -0500 |
commit | 8971f626f2e69987bea729307adb93a0be243234 (patch) | |
tree | 6a65f50e3c1f7bea3590c8a02ba149423c376037 /.dir-locals.el | |
parent | 37545de4a3bf59611c184b31506fe9a16abe4c8b (diff) | |
download | guix-8971f626f2e69987bea729307adb93a0be243234.tar.gz |
database: separate transaction-handling and retry-handling.
Previously call-with-transaction would both retry when SQLITE_BUSY errors were thrown and do what its name suggested (start and rollback/commit a transaction). This changes it to do only what its name implies, which simplifies its implementation. Retrying is provided by the new call-with-SQLITE_BUSY-retrying procedure. * guix/store/database.scm (call-with-transaction): no longer restarts, new #:restartable? argument controls whether "begin" or "begin immediate" is used. (call-with-SQLITE_BUSY-retrying, call-with-retrying-transaction, call-with-retrying-savepoint): new procedures. (register-items): use call-with-retrying-transaction to preserve old behavior. * .dir-locals.el (call-with-retrying-transaction, call-with-retrying-savepoint): add indentation information.
Diffstat (limited to '.dir-locals.el')
-rw-r--r-- | .dir-locals.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index d9c81b2a48..b88ec7a795 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -90,7 +90,9 @@ (eval . (put 'with-database 'scheme-indent-function 2)) (eval . (put 'call-with-transaction 'scheme-indent-function 2)) (eval . (put 'with-statement 'scheme-indent-function 3)) + (eval . (put 'call-with-retrying-transaction 'scheme-indent-function 2)) (eval . (put 'call-with-savepoint 'scheme-indent-function 1)) + (eval . (put 'call-with-retrying-savepoint 'scheme-indent-function 1)) (eval . (put 'call-with-container 'scheme-indent-function 1)) (eval . (put 'container-excursion 'scheme-indent-function 1)) |