Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup
@ 2020-07-10 13:53 Cyrill Gorcunov
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 1/4] qsync: txn_limbo_assign_local_lsn -- drop redundant declaration Cyrill Gorcunov
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2020-07-10 13:53 UTC (permalink / raw)
  To: tml; +Cc: Vladislav Shpilevoy

The series is on top of previous cleanup patches
(which is sitting in gorcunov/gh-4842-qsync-cleanup)

branch gorcunov/gh-4842-qsync-cleanup-2

Cyrill Gorcunov (4):
  qsync: txn_limbo_assign_local_lsn -- drop redundant declaration
  qsync: txn_limbo_pop -- drop fake reference
  qsync: txn_limbo_read_rollback -- use txn_limbo_abort
  qsync: txn_limbo_wait_complete -- use txn_limbo_abort

 src/box/txn_limbo.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)


base-commit: cbfbf35dc923cf7582e6e143fee703e5e2bcb0eb
-- 
2.26.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Tarantool-patches] [PATCH 1/4] qsync: txn_limbo_assign_local_lsn -- drop redundant declaration
  2020-07-10 13:53 [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Cyrill Gorcunov
@ 2020-07-10 13:53 ` Cyrill Gorcunov
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 2/4] qsync: txn_limbo_pop -- drop fake reference Cyrill Gorcunov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2020-07-10 13:53 UTC (permalink / raw)
  To: tml; +Cc: Vladislav Shpilevoy

We use limbo variable accounting acks so no need for
formal read here.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 src/box/txn_limbo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index d85a3eff9..8a2676a2c 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -131,7 +131,7 @@ txn_limbo_assign_local_lsn(struct txn_limbo *limbo,
 	assert(entry->lsn == -1);
 	assert(lsn > 0);
 	assert(txn_has_flag(entry->txn, TXN_WAIT_ACK));
-	(void) limbo;
+
 	entry->lsn = lsn;
 	/*
 	 * The entry just got its LSN after a WAL write. It could
-- 
2.26.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Tarantool-patches] [PATCH 2/4] qsync: txn_limbo_pop -- drop fake reference
  2020-07-10 13:53 [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Cyrill Gorcunov
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 1/4] qsync: txn_limbo_assign_local_lsn -- drop redundant declaration Cyrill Gorcunov
@ 2020-07-10 13:53 ` Cyrill Gorcunov
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 3/4] qsync: txn_limbo_read_rollback -- use txn_limbo_abort Cyrill Gorcunov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2020-07-10 13:53 UTC (permalink / raw)
  To: tml; +Cc: Vladislav Shpilevoy

The limbo variable is accessed unconditionally
thus no need for fake reference.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 src/box/txn_limbo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index 8a2676a2c..973ef96e8 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -91,7 +91,7 @@ txn_limbo_pop(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
 	assert(!rlist_empty(&entry->in_queue));
 	assert(txn_limbo_last_entry(limbo) == entry);
 	assert(entry->is_rollback);
-	(void) limbo;
+
 	rlist_del_entry(entry, in_queue);
 	++limbo->rollback_count;
 }
-- 
2.26.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Tarantool-patches] [PATCH 3/4] qsync: txn_limbo_read_rollback -- use txn_limbo_abort
  2020-07-10 13:53 [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Cyrill Gorcunov
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 1/4] qsync: txn_limbo_assign_local_lsn -- drop redundant declaration Cyrill Gorcunov
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 2/4] qsync: txn_limbo_pop -- drop fake reference Cyrill Gorcunov
@ 2020-07-10 13:53 ` Cyrill Gorcunov
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 4/4] qsync: txn_limbo_wait_complete " Cyrill Gorcunov
  2020-07-10 20:40 ` [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Vladislav Shpilevoy
  4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2020-07-10 13:53 UTC (permalink / raw)
  To: tml; +Cc: Vladislav Shpilevoy

Bsaically this is the same what txn_limbo_abort does.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 src/box/txn_limbo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index 973ef96e8..9f872f4b5 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -363,8 +363,7 @@ txn_limbo_read_rollback(struct txn_limbo *limbo, int64_t lsn)
 	if (last_rollback == NULL)
 		return;
 	rlist_foreach_entry_safe_reverse(e, &limbo->queue, in_queue, tmp) {
-		e->is_rollback = true;
-		txn_limbo_pop(limbo, e);
+		txn_limbo_abort(limbo, e);
 		txn_clear_flag(e->txn, TXN_WAIT_SYNC);
 		txn_clear_flag(e->txn, TXN_WAIT_ACK);
 		if (e->txn->signature >= 0) {
-- 
2.26.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Tarantool-patches] [PATCH 4/4] qsync: txn_limbo_wait_complete -- use txn_limbo_abort
  2020-07-10 13:53 [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Cyrill Gorcunov
                   ` (2 preceding siblings ...)
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 3/4] qsync: txn_limbo_read_rollback -- use txn_limbo_abort Cyrill Gorcunov
@ 2020-07-10 13:53 ` Cyrill Gorcunov
  2020-07-10 20:40 ` [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Vladislav Shpilevoy
  4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2020-07-10 13:53 UTC (permalink / raw)
  To: tml; +Cc: Vladislav Shpilevoy

Instead of open coding.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 src/box/txn_limbo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index 9f872f4b5..207487a4d 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -198,9 +198,8 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
 	struct txn_limbo_entry *e, *tmp;
 	rlist_foreach_entry_safe_reverse(e, &limbo->queue,
 					 in_queue, tmp) {
-		e->is_rollback = true;
 		e->txn->signature = TXN_SIGNATURE_QUORUM_TIMEOUT;
-		txn_limbo_pop(limbo, e);
+		txn_limbo_abort(limbo, e);
 		txn_clear_flag(e->txn, TXN_WAIT_SYNC);
 		txn_clear_flag(e->txn, TXN_WAIT_ACK);
 		txn_complete(e->txn);
-- 
2.26.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup
  2020-07-10 13:53 [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Cyrill Gorcunov
                   ` (3 preceding siblings ...)
  2020-07-10 13:53 ` [Tarantool-patches] [PATCH 4/4] qsync: txn_limbo_wait_complete " Cyrill Gorcunov
@ 2020-07-10 20:40 ` Vladislav Shpilevoy
  2020-07-11 16:08   ` Vladislav Shpilevoy
  4 siblings, 1 reply; 7+ messages in thread
From: Vladislav Shpilevoy @ 2020-07-10 20:40 UTC (permalink / raw)
  To: Cyrill Gorcunov, tml

Thanks for the patchset! This one LGTM, actually good
changes. Reduce code duplication, drop unnecessary code.
I will push it later.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup
  2020-07-10 20:40 ` [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Vladislav Shpilevoy
@ 2020-07-11 16:08   ` Vladislav Shpilevoy
  0 siblings, 0 replies; 7+ messages in thread
From: Vladislav Shpilevoy @ 2020-07-11 16:08 UTC (permalink / raw)
  To: Cyrill Gorcunov, tml

These 4 commits are pushed to master.

On 10/07/2020 22:40, Vladislav Shpilevoy wrote:
> Thanks for the patchset! This one LGTM, actually good
> changes. Reduce code duplication, drop unnecessary code.
> I will push it later.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-11 16:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 13:53 [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Cyrill Gorcunov
2020-07-10 13:53 ` [Tarantool-patches] [PATCH 1/4] qsync: txn_limbo_assign_local_lsn -- drop redundant declaration Cyrill Gorcunov
2020-07-10 13:53 ` [Tarantool-patches] [PATCH 2/4] qsync: txn_limbo_pop -- drop fake reference Cyrill Gorcunov
2020-07-10 13:53 ` [Tarantool-patches] [PATCH 3/4] qsync: txn_limbo_read_rollback -- use txn_limbo_abort Cyrill Gorcunov
2020-07-10 13:53 ` [Tarantool-patches] [PATCH 4/4] qsync: txn_limbo_wait_complete " Cyrill Gorcunov
2020-07-10 20:40 ` [Tarantool-patches] [PATCH 0/4] qsync: continue cleanup Vladislav Shpilevoy
2020-07-11 16:08   ` Vladislav Shpilevoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox