[Tarantool-patches] [PATCH 1/5] qsync: eliminate redundant writes
Cyrill Gorcunov
gorcunov at gmail.com
Fri Jul 10 10:56:01 MSK 2020
Instead of updating is_sync variable on every
cycle write it once.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
src/box/txn.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/box/txn.c b/src/box/txn.c
index a2df23833..49b2b2649 100644
--- a/src/box/txn.c
+++ b/src/box/txn.c
@@ -567,8 +567,12 @@ txn_journal_entry_new(struct txn *txn)
if (stmt->row == NULL)
continue;
- is_sync = is_sync || (stmt->space != NULL &&
- stmt->space->def->opts.is_sync);
+ if (!is_sync) {
+ if (stmt->space != NULL &&
+ stmt->space->def->opts.is_sync) {
+ is_sync = true;
+ }
+ }
if (stmt->row->replica_id == 0)
*local_row++ = stmt->row;
--
2.26.2
More information about the Tarantool-patches
mailing list