Changeset: ac2d63952cc6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac2d63952cc6 Modified Files: sql/storage/store.c Branch: HTM Log Message:
Make sure the transaction is fully written-out in the WAL during precommit diffs (45 lines): diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -3359,28 +3359,26 @@ sql_trans_precommit(sql_trans *tr) result = logger_funcs.log_tstart(); if (result == LOG_OK) result = rollforward_trans(tr, R_LOG); - return result; - } - return (result==LOG_OK)?SQL_OK:SQL_ERR; -} - -int -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); - } - - if (result == LOG_OK) { if (result == LOG_OK && prev_oid != store_oid) result = logger_funcs.log_sequence(OBJ_SID, store_oid); prev_oid = store_oid; if (result == LOG_OK) result = logger_funcs.log_tend(); tr->schema_number = store_schema_number(); + return result; } + return (result==LOG_OK)?SQL_OK:SQL_ERR; +} + +int +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); + } + if (result == LOG_OK) { /* It is save to rollforward the changes now. In case of failure, the log will be replayed. */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list