From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <kostja.osipov@gmail.com> 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 <tarantool-patches@dev.tarantool.org>; Thu, 26 Mar 2020 21:08:17 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id n17so7421999lji.8 for <tarantool-patches@dev.tarantool.org>; Thu, 26 Mar 2020 11:08:17 -0700 (PDT) Date: Thu, 26 Mar 2020 21:08:14 +0300 From: Konstantin Osipov <kostja.osipov@gmail.com> Message-ID: <20200326180814.GA26374@atlas> References: <cover.1585097339.git.korablev@tarantool.org> <d0a6aaffaaaea96d81a0cd006b9aeb762b2bcea7.1585097339.git.korablev@tarantool.org> <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 <tarantool-patches.dev.tarantool.org> List-Unsubscribe: <https://lists.tarantool.org/mailman/options/tarantool-patches>, <mailto:tarantool-patches-request@dev.tarantool.org?subject=unsubscribe> List-Archive: <https://lists.tarantool.org/pipermail/tarantool-patches/> List-Post: <mailto:tarantool-patches@dev.tarantool.org> List-Help: <mailto:tarantool-patches-request@dev.tarantool.org?subject=help> List-Subscribe: <https://lists.tarantool.org/mailman/listinfo/tarantool-patches>, <mailto:tarantool-patches-request@dev.tarantool.org?subject=subscribe> To: Nikita Pettik <korablev@tarantool.org> Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org * Nikita Pettik <korablev@tarantool.org> [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