fix nested top action log race; because of a refactoring mistake, it was releasing a mutex without acquiring it...
This commit is contained in:
parent
9dba8770f0
commit
dbf253275f
3 changed files with 3 additions and 6 deletions
|
@ -113,7 +113,7 @@ LogEntry * stasis_log_write_update(stasis_log_t* log, stasis_transaction_table_e
|
|||
return e;
|
||||
}
|
||||
// XXX change nta interface so that arg gets passed into end_nta, not begin_nta.
|
||||
LogEntry * stasis_log_begin_nta(stasis_log_t* log, stasis_transaction_table_entry_t * l, unsigned int op,
|
||||
void * stasis_log_begin_nta(stasis_log_t* log, stasis_transaction_table_entry_t * l, unsigned int op,
|
||||
const byte * arg, size_t arg_size) {
|
||||
LogEntry * e = mallocScratchUpdateLogEntry(INVALID_LSN, l->prevLSN, l->xid, op, INVALID_PAGE, arg_size);
|
||||
memcpy(stasis_log_entry_update_args_ptr(e), arg, arg_size);
|
||||
|
|
|
@ -418,10 +418,7 @@ int TnestedTopAction(int xid, int op, const byte * dat, size_t datSize) {
|
|||
void * TbeginNestedTopAction(int xid, int op, const byte * dat, int datSize) {
|
||||
assert(xid >= 0);
|
||||
|
||||
LogEntry * e = stasis_log_begin_nta(stasis_log_file, stasis_transaction_table_get(stasis_transaction_table, xid), op, dat, datSize);
|
||||
LogEntry * ret = malloc(sizeofLogEntry(stasis_log_file, e));
|
||||
memcpy(ret, e, sizeofLogEntry(stasis_log_file, e));
|
||||
stasis_log_file->write_entry_done(stasis_log_file, e);
|
||||
void * ret = stasis_log_begin_nta(stasis_log_file, stasis_transaction_table_get(stasis_transaction_table, xid), op, dat, datSize);
|
||||
DEBUG("Begin Nested Top Action e->LSN: %ld\n", e->LSN);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -327,7 +327,7 @@ lsn_t stasis_log_write_clr(stasis_log_t* log, const LogEntry * e);
|
|||
|
||||
lsn_t stasis_log_write_dummy_clr(stasis_log_t* log, int xid, lsn_t prev_lsn);
|
||||
|
||||
LogEntry * stasis_log_begin_nta(stasis_log_t* log, stasis_transaction_table_entry_t * l, unsigned int op,
|
||||
void * stasis_log_begin_nta(stasis_log_t* log, stasis_transaction_table_entry_t * l, unsigned int op,
|
||||
const byte * arg, size_t arg_size);
|
||||
lsn_t stasis_log_end_nta(stasis_log_t* log, stasis_transaction_table_entry_t * l, LogEntry * e);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue