[Tarantool-patches] [PATCH v2 4/4] qsync: don't send negative timeouts into fiber_cond_wait_timeout
Cyrill Gorcunov
gorcunov at gmail.com
Fri Jul 17 23:33:36 MSK 2020
On Fri, Jul 17, 2020 at 10:03:49PM +0200, Vladislav Shpilevoy wrote:
> >
> > Am I missing something obvious here?
>
> I still don't see how to trigger this assert. Please, show a code sample with
> error injection, if you think that will help. I explicitly added line
> 'timeout = -1;' and all worked fine.
>
---
[cyrill at grain tarantool.git] git diff
diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index 0924952b7..50e6326b3 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -175,8 +175,9 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
while (true) {
double deadline = start_time + replication_synchro_timeout;
double timeout = deadline - fiber_clock();
- if (timeout < 0)
- goto do_rollback;
+ timeout = -1;
+ //if (timeout < 0)
+ // goto do_rollback;
bool cancellable = fiber_set_cancellable(false);
int rc = fiber_cond_wait_timeout(&limbo->wait_cond, timeout);
fiber_set_cancellable(cancellable);
@@ -512,8 +513,9 @@ txn_limbo_wait_confirm(struct txn_limbo *limbo)
while (true) {
double deadline = start_time + replication_synchro_timeout;
double timeout = deadline - fiber_clock();
- if (timeout < 0)
- goto timed_out;
+ timeout = -1;
+ //if (timeout < 0)
+ // goto timed_out;
bool cancellable = fiber_set_cancellable(false);
int rc = fiber_cond_wait_timeout(&limbo->wait_cond, timeout);
fiber_set_cancellable(cancellable);
---
[cyrill at grain test] ./test-run.py replication/qsync_basic.test.lua
...
[001] [Instance "master" killed by signal: 6 (SIGABRT)]
[001] Found assertion fail in the results file [/home/cyrill/d1/projects/tarantool/tarantool.git/test/var/001_replication/master.log]:
You did the same thing? Note that it requires debug build.
More information about the Tarantool-patches
mailing list