Changeset: ab54cb684726 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ab54cb684726
Modified Files:
        sql/server/sql_mvc.c
        sql/storage/store.c
Branch: HTM
Log Message:

Some cleanup and clarifications


diffs (41 lines):

diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c
--- a/sql/server/sql_mvc.c
+++ b/sql/server/sql_mvc.c
@@ -336,11 +336,10 @@ int
 mvc_persistcommit(mvc *m, int chain, const char *name, long id) {
        int result = SQL_OK;//, wait = 0;
        /* use the parent, since we semi-rolled forward in mvc_commit_prepare */
-       sql_trans *tr = sql_trans_create(m->session->stk, m->session->tr, name);
+       sql_trans *tr = m->session->tr->parent;
        // set CPaaS HTM id
        tr->htm_id = id;
 
-
        store_lock();
        // find the transaction
        if (name && name[0] != '\0') {
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -3375,15 +3375,15 @@ sql_trans_persistcommit(sql_trans *tr)
        int result = LOG_OK;
 
        if (bs_debug) {
-                       fprintf(stderr, "#writing changes to persistent store 
%d,%d\n", gtrans->stime, gtrans->wstime);
+               fprintf(stderr, "#writing changes to persistent store %d,%d\n", 
gtrans->stime, gtrans->wstime);
        }
 
+       /* It is save to rollforward the changes now. In case
+         of failure, the log will be replayed. */
+       result = rollforward_trans(tr, R_APPLY);
+
        if (result == LOG_OK) {
-               /* It is save to rollforward the changes now. In case 
-                  of failure, the log will be replayed. */
-               result = rollforward_trans(tr, R_APPLY);
-       }
-       if (result == LOG_OK) {
+               /* Mark the transaction as globally persisted as well */
                result = logger_funcs.log_globalpersist(tr->htm_id);
        }
     return (result==LOG_OK)?SQL_OK:SQL_ERR;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to