From: Aleksander Alekseev <a.alekseev@postgrespro.ru>
To: Victor Drobny <v.drobny@postgrespro.ru>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Red-Black tree traversal tests
Date: Tue, 1 Aug 2017 12:54:47 +0300
Message-ID: <20170801095446.GA22764@e733.localdomain> (raw)
In-Reply-To: <c9d61310e16e75f8acaf6cb1c48b7b77@postgrespro.ru>
References: <c9d61310e16e75f8acaf6cb1c48b7b77@postgrespro.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Hi Victor,
> Postgres now has its own red-black tree implementation. This tree has 4
> types of traversals. In the attachment, you can find module test that
> checks the correctness of tree traversal strategies.
>
> I hope that someone can find it useful.
Great job! However, according to lcov report, some procedures declared
in rbtree.c are still not test covered even with your patch,
particularly:
* rb_find
* rb_leftmost
* rb_delete + dependencies (rb_delete_fixup, etc)
You can generate a corresponding report using this script [1].
I must say, I was a little surprised that rb_find is not used anywhere
in PostgreSQL code. Turned out that rbtree currently is used only by GIN
and it uses a small subset of all procedures.
If it's not too much trouble perhaps you could write a few more test so
we would have 100% test coverage for rbtree, could modify it safely and
be sure that it actually works when someone will need the rest of its
functionality?
[1]: https://github.com/afiskon/pgscripts/blob/master/code-coverage.sh
--
Best regards,
Aleksander Alekseev
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: a.alekseev@postgrespro.ru, v.drobny@postgrespro.ru
Subject: Re: Red-Black tree traversal tests
In-Reply-To: <20170801095446.GA22764@e733.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox