<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable, branch v2.47.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.47.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.47.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-10-04T21:21:40Z</updated>
<entry>
<title>Merge branch 'ak/typofix-2.46-maint'</title>
<updated>2024-10-04T21:21:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-10-04T21:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4861bbf85a1265c6a0e939674bb4441e748d5542'/>
<id>urn:sha1:4861bbf85a1265c6a0e939674bb4441e748d5542</id>
<content type='text'>
Typofixes.

* ak/typofix-2.46-maint:
  perl: fix a typo
  mergetool: fix a typo
  reftable: fix a typo
  trace2: fix typos
</content>
</entry>
<entry>
<title>reftable: fix a typo</title>
<updated>2024-10-03T19:06:51Z</updated>
<author>
<name>Andrew Kreimer</name>
<email>algonell@gmail.com</email>
</author>
<published>2024-10-02T22:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a54601c38b2ca24ae5a2f15906618fc61e24be78'/>
<id>urn:sha1:a54601c38b2ca24ae5a2f15906618fc61e24be78</id>
<content type='text'>
Fix a typo in comments.

Signed-off-by: Andrew Kreimer &lt;algonell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/reftable-concurrent-writes'</title>
<updated>2024-09-30T23:16:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-09-30T23:16:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab68c70a8b90626be24d95a27f6495ab6e7e57a5'/>
<id>urn:sha1:ab68c70a8b90626be24d95a27f6495ab6e7e57a5</id>
<content type='text'>
Give timeout to the locking code to write to reftable.

* ps/reftable-concurrent-writes:
  refs/reftable: reload locked stack when preparing transaction
  reftable/stack: allow locking of outdated stacks
  refs/reftable: introduce "reftable.lockTimeout"
</content>
</entry>
<entry>
<title>reftable/stack: allow locking of outdated stacks</title>
<updated>2024-09-24T16:45:25Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-09-24T05:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=80e7342ea8ecda48bdf034e77c32ac1c5d2bda85'/>
<id>urn:sha1:80e7342ea8ecda48bdf034e77c32ac1c5d2bda85</id>
<content type='text'>
In `reftable_stack_new_addition()` we first lock the stack and then
check whether it is still up-to-date. If it is not we return an error to
the caller indicating that the stack is outdated.

This is overly restrictive in our ref transaction interface though: we
lock the stack right before we start to verify the transaction, so we do
not really care whether it is outdated or not. What we really want is
that the stack is up-to-date after it has been locked so that we can
verify queued updates against its current state while we know that it is
locked for concurrent modification.

Introduce a new flag `REFTABLE_STACK_NEW_ADDITION_RELOAD` that alters
the behaviour of `reftable_stack_init_addition()` in this case: when we
notice that it is out-of-date we reload it instead of returning an error
to the caller.

This logic will be wired up in the reftable backend in the next commit.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs/reftable: introduce "reftable.lockTimeout"</title>
<updated>2024-09-24T16:45:25Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-09-24T05:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc39b6a796eb707c34ffb759d50a75f96313f26c'/>
<id>urn:sha1:bc39b6a796eb707c34ffb759d50a75f96313f26c</id>
<content type='text'>
When multiple concurrent processes try to update references in a
repository they may try to lock the same lockfiles. This can happen even
when the updates are non-conflicting and can both be applied, so it
doesn't always make sense to abort the transaction immediately. Both the
"loose" and "packed" backends thus have a grace period that they wait
for the lock to be released that can be controlled via the config values
"core.filesRefLockTimeout" and "core.packedRefsTimeout", respectively.

The reftable backend doesn't have such a setting yet and instead fails
immediately when it sees such a lock. But the exact same concepts apply
here as they do apply to the other backends.

Introduce a new "reftable.lockTimeout" config that controls how long we
may wait for a "tables.list" lock to be released. The default value of
this config is 100ms, which is the same default as we have it for the
"loose" backend.

Note that even though we also lock individual tables, this config really
only applies to the "tables.list" file. This is because individual
tables are only ever locked when we already hold the "tables.list" lock
during compaction. When we observe such a lock we in fact do not want to
compact the table at all because it is already in the process of being
compacted by a concurrent process. So applying the same timeout here
would not make any sense and only delay progress.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable/reader: make table iterator reseekable</title>
<updated>2024-09-16T20:57:19Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-09-16T08:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a148a8eda7da6f7ff039ff2ea62b143ceb57f2f'/>
<id>urn:sha1:0a148a8eda7da6f7ff039ff2ea62b143ceb57f2f</id>
<content type='text'>
In 67ce50ba26 (Merge branch 'ps/reftable-reusable-iterator', 2024-05-30)
we have refactored the interface of reftable iterators such that they
can be reused in theory. This patch series only landed the required
changes on the interface level, but didn't yet implement the actual
logic to make iterators reusable.

As it turns out almost all of the infrastructure already does support
re-seeking. The only exception is the table iterator, which does not
reset its `is_finished` bit. Do so and add a couple of tests that verify
that we can re-seek iterators.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t: move reftable/stack_test.c to the unit testing framework</title>
<updated>2024-09-08T20:24:03Z</updated>
<author>
<name>Chandra Pratap</name>
<email>chandrapratap3519@gmail.com</email>
</author>
<published>2024-09-08T04:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15e29ea1c648149304b31d662b286718d0e6fde8'/>
<id>urn:sha1:15e29ea1c648149304b31d662b286718d0e6fde8</id>
<content type='text'>
reftable/stack_test.c exercises the functions defined in
reftable/stack.{c, h}. Migrate reftable/stack_test.c to the
unit testing framework. Migration involves refactoring the tests
to use the unit testing framework instead of reftable's test
framework and renaming the tests to be in-line with unit-tests'
standards.

Since some of the tests use set_test_hash() defined by
reftable/test_framework.{c, h} but these files are not
'#included' in the test file, copy this function in the
ported test file.

With the migration of stack test to the unit-tests framework,
"test-tool reftable" becomes a no-op. Hence, get rid of everything
that uses "test-tool reftable" alongside everything that is used
to implement it.

While at it, alphabetically sort the cmds[] list in
helper/test-tool.c by moving the entry for "dump-reftable".

Mentored-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Chandra Pratap &lt;chandrapratap3519@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/reftable-concurrent-compaction'</title>
<updated>2024-09-03T16:15:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-09-03T16:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=17636cdf3b0bf344a2e3090fd8bf254cf3ec0a2f'/>
<id>urn:sha1:17636cdf3b0bf344a2e3090fd8bf254cf3ec0a2f</id>
<content type='text'>
The code path for compacting reftable files saw some bugfixes
against concurrent operation.

* ps/reftable-concurrent-compaction:
  reftable/stack: fix segfault when reload with reused readers fails
  reftable/stack: reorder swapping in the reloaded stack contents
  reftable/reader: keep readers alive during iteration
  reftable/reader: introduce refcounting
  reftable/stack: fix broken refnames in `write_n_ref_tables()`
  reftable/reader: inline `reader_close()`
  reftable/reader: inline `init_reader()`
  reftable/reader: rename `reftable_new_reader()`
  reftable/stack: inline `stack_compact_range_stats()`
  reftable/blocksource: drop malloc block source
</content>
</entry>
<entry>
<title>Merge branch 'cp/unit-test-reftable-block'</title>
<updated>2024-08-29T18:08:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-08-29T18:08:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=839b808325724e4e47c3ca18b2b131c205123632'/>
<id>urn:sha1:839b808325724e4e47c3ca18b2b131c205123632</id>
<content type='text'>
Another test for reftable library ported to the unit test framework.

* cp/unit-test-reftable-block:
  t-reftable-block: mark unused argv/argc
  t-reftable-block: add tests for index blocks
  t-reftable-block: add tests for obj blocks
  t-reftable-block: add tests for log blocks
  t-reftable-block: remove unnecessary variable 'j'
  t-reftable-block: use xstrfmt() instead of xstrdup()
  t-reftable-block: use block_iter_reset() instead of block_iter_close()
  t-reftable-block: use reftable_record_key() instead of strbuf_addstr()
  t-reftable-block: use reftable_record_equal() instead of check_str()
  t-reftable-block: release used block reader
  t: harmonize t-reftable-block.c with coding guidelines
  t: move reftable/block_test.c to the unit testing framework
</content>
</entry>
<entry>
<title>Merge branch 'ps/reftable-drop-generic'</title>
<updated>2024-08-29T18:08:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-08-29T18:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d4d677704d74db389d2f56975794cd85acb8181f'/>
<id>urn:sha1:d4d677704d74db389d2f56975794cd85acb8181f</id>
<content type='text'>
The code in the reftable library has been cleaned up by discarding
unused "generic" interface.

* ps/reftable-drop-generic:
  reftable: mark unused parameters in empty iterator functions
  reftable/generic: drop interface
  t/helper: refactor to not use `struct reftable_table`
  t/helper: use `hash_to_hex_algop()` to print hashes
  t/helper: inline printing of reftable records
  t/helper: inline `reftable_table_print()`
  t/helper: inline `reftable_stack_print_directory()`
  t/helper: inline `reftable_reader_print_file()`
  t/helper: inline `reftable_dump_main()`
  reftable/dump: drop unused `compact_stack()`
  reftable/generic: move generic iterator code into iterator interface
  reftable/iter: drop double-checking logic
  reftable/stack: open-code reading refs
  reftable/merged: stop using generic tables in the merged table
  reftable/merged: rename `reftable_new_merged_table()`
  reftable/merged: expose functions to initialize iterators
</content>
</entry>
</feed>
