From: Karthik Nayak Date: Wed, 24 Sep 2025 20:13:51 GMT Subject: Re: [PATCH v3 4/8] reftable: ensure tables in a stack use sequential update indices Message-ID: In-Reply-To: Junio C Hamano writes: >>> Now if we compact the second and the third table, the compaction will >>> realize that r2 is deleted and thus no longer needs to be part of the >>> compacted table. So the new state is: >>> >>> - A base table with record r1 and update index r1. >>> - The compacted table with record r3 with update index 3. >> ... >> However, I think your point holds. I do think eventually we could >> optimize this to ensure that we do something like you described. >> >> I will make changes accordingly. > > If you allow gaps in the indices, it is a bit confusing to call them > "sequential"; "monotonically increasing" is less confusing and it > conveys the author's intention to allow gaps clear (otherwise the > author wouldn't be using such an awkward two-word phrase instead of > "sequencial"). Wouldn't 'monotonically increasing' suggest that prev_table.max_update_index can be equal to cur_table.min_update_index? I have locally changed it to 'ascending order' for similar reasons.