Re: [PATCH v2 0/3] reftable/stack: use geometric table compaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 22, 2024 at 10:51 AM Patrick Steinhardt <ps@xxxxxx> wrote:
> > Thanks for taking a look!
>
> Cc'ing Han-Wen and Josh for additional input. From my point of view the
> new algorithm is simpler to understand and less fragile, but I do wonder
> whether there is anything that we're missing.

Good spotting. I hadn't thought about alternating tables.

I have one minor criticism:

Environment variables are untyped global variables without any form of
data protection, so I find them unsavoury, and have tried to avoid
them throughout. (The whole reftable library only looks at $TMPDIR in
tests). They're also accessible to end users, so it can become a
feature that can inadvertently become a maintenance burden.

For testing, there is a stack->disable_auto_compact.

If you want to keep that style, I would elevate disable_auto_compact
into reftable_write_options to make it API surface. This will let you
use it in tests written in C, which can be unittests and therefore
more precise and fine-grained. They also run more quickly, and are
easier to instrument with asan/valgrind/etc. The test for tables with
alternating sizes can be easily written in C.

If you really need it, you could initialize disable_auto_compact from
the environment, but I would suggest avoiding it if possible.

-- 
Han-Wen Nienhuys - hanwenn@xxxxxxxxx - http://www.xs4all.nl/~hanwen





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux