[Tarantool-patches] [PATCH 5/8] txn_limbo: follow-up fixes
Serge Petrenko
sergepetrenko at tarantool.org
Tue Jun 9 15:20:17 MSK 2020
Part-of #4847
Follow-up #4844
Follow-up #4845
---
src/box/txn.c | 5 +++--
src/box/txn_limbo.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/box/txn.c b/src/box/txn.c
index 1d6518e29..f30e20944 100644
--- a/src/box/txn.c
+++ b/src/box/txn.c
@@ -459,7 +459,7 @@ txn_complete(struct txn *txn)
* back to the fiber, owning the transaction so as
* it could decide what to do next.
*/
- if (txn->fiber != fiber())
+ if (txn->fiber != NULL && txn->fiber != fiber())
fiber_wakeup(txn->fiber);
return;
}
@@ -523,7 +523,8 @@ txn_journal_entry_new(struct txn *txn)
txn_init_triggers(txn);
rlist_splice(&txn->on_commit, &stmt->on_commit);
}
- is_sync = is_sync || stmt->space->def->opts.is_sync;
+ is_sync = is_sync || (stmt->space != NULL &&
+ stmt->space->def->opts.is_sync);
/* A read (e.g. select) request */
if (stmt->row == NULL)
diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index d28b2a28b..47c1bd249 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -108,7 +108,7 @@ txn_limbo_check_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
ack_count += vc.lsn >= lsn;
assert(ack_count >= entry->ack_count);
entry->ack_count = ack_count;
- entry->is_commit = ack_count > replication_sync_quorum;
+ entry->is_commit = ack_count >= replication_sync_quorum;
return entry->is_commit;
}
--
2.24.3 (Apple Git-128)
More information about the Tarantool-patches
mailing list