Skip to content

Commit 38c9a43

Browse files
authored
Merge branch 'master' into pr/fix
2 parents c521fd7 + 70fdafa commit 38c9a43

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

debian/changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
elliptics (2.27.9.11) unstable; urgency=low
2+
3+
* fix: initialize monitor after other server_node's inner components
4+
* fix: fix deadlock if calloc returned zero
5+
* fix: put transation back to timer-tree only if it exists
6+
7+
-- Artem Selishchev <arselishev@gmail.com> Thu, 16 May 2019 23:34:42 +0300
8+
19
elliptics (2.27.9.10) unstable; urgency=low
210

311
* feat: add statistics for errors per groups in dnet_recovery

library/net.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -674,22 +674,25 @@ static int dnet_process_reply(struct dnet_net_state *st, struct dnet_io_req *r)
674674
t->complete(dnet_state_addr(t->st), cmd, t->priv);
675675
}
676676

677-
dnet_trans_put(t);
678677
if (!(flags & DNET_FLAGS_MORE)) {
679678
memcpy(&t->cmd, cmd, sizeof(struct dnet_cmd));
680679
dnet_trans_put(t);
681680
} else {
682681
/*
683-
* Put transaction back into the end of 'timer' tree with updated timestamp.
682+
* If transaction isn't deleted from main ('trans') tree, put it back into the end of 'timer' tree
683+
* with updated timestamp.
684684
* Transaction had been removed from timer tree in @dnet_update_trans_timestamp_network() in network
685685
* thread right after whole data was read.
686686
*/
687687

688688
pthread_mutex_lock(&st->trans_lock);
689-
dnet_trans_update_timestamp(t);
690-
dnet_trans_insert_timer_nolock(st, t);
689+
if (t->trans_entry.rb_parent_color) {
690+
dnet_trans_update_timestamp(t);
691+
dnet_trans_insert_timer_nolock(st, t);
692+
}
691693
pthread_mutex_unlock(&st->trans_lock);
692694
}
695+
dnet_trans_put(t);
693696

694697
out:
695698
return err;

library/trans.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static int dnet_trans_convert_timed_out_to_responses(struct dnet_net_state *st,
704704
"timed-out transaction %s in output list",
705705
dnet_dump_id(&t->cmd.id), dnet_cmd_string(t->cmd.cmd),
706706
dnet_print_trans(t));
707+
dnet_logger_unset_trace_id();
708+
pthread_mutex_unlock(&st->trans_lock);
707709
continue;
708710
}
709711

0 commit comments

Comments
 (0)