notroj commented on code in PR #49:
URL: https://github.com/apache/apr/pull/49#discussion_r1369834921


##########
dbm/apr_dbm_lmdb.c:
##########
@@ -237,9 +256,14 @@ static apr_status_t vt_lmdb_del(apr_dbm_t *dbm, 
apr_datum_t key)
 
     if ((rv = mdb_del(f->txn, f->dbi, &ckey, NULL)) == 0) {
         /* commit transaction */
-        if (((rv = mdb_txn_commit(f->txn)) == MDB_SUCCESS)
-            && ((rv = mdb_txn_begin(f->env, NULL, 0, &f->txn)) == 
MDB_SUCCESS)) {
+        if ((rv = mdb_txn_commit(f->txn)) == MDB_SUCCESS) {
             f->cursor = NULL;

Review Comment:
   same as above



##########
dbm/apr_dbm_lmdb.c:
##########
@@ -216,9 +230,14 @@ static apr_status_t vt_lmdb_store(apr_dbm_t *dbm, 
apr_datum_t key,
 
     if ((rv = mdb_put(f->txn, f->dbi, &ckey, &cvalue, 0)) == 0) {
         /* commit transaction */
-        if (((rv = mdb_txn_commit(f->txn)) == MDB_SUCCESS)
-            && ((rv = mdb_txn_begin(f->env, NULL, 0, &f->txn)) == 
MDB_SUCCESS)) {
+        if ((rv = mdb_txn_commit(f->txn)) == MDB_SUCCESS){
             f->cursor = NULL;

Review Comment:
   Does this need an `mdb_cursor_close(f->cursor);` before setting cursor to 
`NULL`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@apr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to