From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 447722C1CC for ; Wed, 24 Apr 2019 16:22:03 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rh-myib3CGKF for ; Wed, 24 Apr 2019 16:22:03 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id EC2022C1D6 for ; Wed, 24 Apr 2019 16:22:02 -0400 (EDT) From: Vladislav Shpilevoy Subject: [tarantool-patches] [PATCH v2 1/3] swim: store sender UUID in swim io tasks Date: Wed, 24 Apr 2019 23:21:58 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: kostja@tarantool.org Struct swim_task is an asynchronous task generated by the SWIM core and scheduled to be sent when a next EV_WRITE event appears. It has a callback 'complete' called when the task finally sent its packet into the network. In this callback a next SWIM round step can be scheduled, or set a deadline for a ping. Usually it requires to know to which member the packet was sent. for this UUID is required, but swim_task operates by inet addresses only. At this moment UUID necessity can be bypassed via container_of or via some queues, but it is not so once suspicion component is introduced. The patch adds sender's UUID to struct swim_task. Part of #3234 --- src/lib/swim/swim_io.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/swim/swim_io.h b/src/lib/swim/swim_io.h index 88a7f424d..884680859 100644 --- a/src/lib/swim/swim_io.h +++ b/src/lib/swim/swim_io.h @@ -35,6 +35,7 @@ #include "salad/stailq.h" #include "swim_transport.h" #include "tarantool_ev.h" +#include "uuid/tt_uuid.h" #include #include #include @@ -217,6 +218,11 @@ struct swim_task { * A short description of the packet content. For logging. */ const char *desc; + /** + * Sender's UUID used by ping tasks to schedule deadline + * for an ACK. + */ + struct tt_uuid uuid; }; /** Check if @a task is already scheduled. */ -- 2.20.1 (Apple Git-117)