From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 33023441841 for ; Thu, 26 Mar 2020 21:08:17 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id n17so7421999lji.8 for ; Thu, 26 Mar 2020 11:08:17 -0700 (PDT) Date: Thu, 26 Mar 2020 21:08:14 +0300 From: Konstantin Osipov Message-ID: <20200326180814.GA26374@atlas> References: <20200326165413.GD21134@atlas> <20200326180352.GD5718@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326180352.GD5718@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2 06/10] box: introduce stacked diagnostic area List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org * Nikita Pettik [20/03/26 21:04]: > > If you have to do it, better use rlist, rlist_del(e) rlist_add(e), > > this will make sure there are no cycles and the cost is constant. > > rlist implementation is not really suitable for organizing errors > into list. See comment in the code: > > * RLIST implementation is not really suitable here > * since it is organized as circular list. In such > * a case it is impossible to start an iteration > * from any node and finish at the logical end of the > * list. I missed it, sorry. No, it's still possible, you can stor struct rlist head in the diagnostics, and whenever you meet the head, you reached the end. Basically an end marker. -- Konstantin Osipov, Moscow, Russia