From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Han-Wen Nienhuys <hanwen@google.com>,
Karthik Nayak <karthik.188@gmail.com>
Subject: [PATCH v4 0/2] refs: introduce reftable backend
Date: Wed, 7 Feb 2024 08:20:27 +0100 [thread overview]
Message-ID: <cover.1707288261.git.ps@pks.im> (raw)
In-Reply-To: <cover.1706601199.git.ps@pks.im>
[-- Attachment #1: Type: text/plain, Size: 5421 bytes --]
Hi,
this is the fourth version of my patch series that introduces the
reftable backend.
Changes compared to v3:
- kn/for-all-refs has been reverted due to discussions around its user
interface. I have thus evicted the patch series as a dependency and
dropped handling of DO_FOR_EACH_INCLUDE_ALL_REFS.
- ps/reftable-compacted-tables-permission-fix has been merged to
"master" now, fixing permissions on "tables.list" when compacting
reftables. I've marked the corresponding test as succeeding.
- jc/reftable-core-fsync has been merged to "master" now, which adds
fsyncing logic to reftable. I've marked the corresponding test as
succeeding.
- I noticed that the fsync tests fail on macOS because there we use a
different fsync method by default. I fixed that by explicitly saying
which fsync method should be used in the corresponding tests.
- I also noticed that the second fsync test reused "trace2.txt" from
the first fsync test because it only appends to the file. Thus, we
saw two fsync events instead of one. I fixed that by truncating the
file.
The patch series is based on the current "master" branch at 235986be82
(The fourteenth batch, 2024-02-06).
Thanks!
Patrick
Patrick Steinhardt (2):
refs: introduce reftable backend
ci: add jobs to test with the reftable backend
.github/workflows/main.yml | 9 +
.gitlab-ci.yml | 9 +
Documentation/ref-storage-format.txt | 2 +
.../technical/repository-version.txt | 5 +-
Makefile | 1 +
ci/lib.sh | 2 +-
ci/run-build-and-tests.sh | 3 +
contrib/workdir/git-new-workdir | 2 +-
path.c | 2 +-
path.h | 1 +
refs.c | 1 +
refs/refs-internal.h | 1 +
refs/reftable-backend.c | 2297 +++++++++++++++++
repository.h | 5 +-
t/t0610-reftable-basics.sh | 887 +++++++
t/t0611-reftable-httpd.sh | 26 +
t/test-lib.sh | 2 +
17 files changed, 3248 insertions(+), 7 deletions(-)
create mode 100644 refs/reftable-backend.c
create mode 100755 t/t0610-reftable-basics.sh
create mode 100755 t/t0611-reftable-httpd.sh
Range-diff against v3:
1: d83e66e980 ! 1: 5de60d46bd refs: introduce reftable backend
@@ refs/reftable-backend.c (new)
+ break;
+
+ /*
-+ * Unless DO_FOR_EACH_INCLUDE_ALL_REFS is set, we only list
-+ * refs starting with "refs/" to mimic the "files" backend.
++ * The files backend only lists references contained in
++ * "refs/". We emulate the same behaviour here and thus skip
++ * all references that don't start with this prefix.
+ */
-+ if (!(iter->flags & DO_FOR_EACH_INCLUDE_ALL_REFS) &&
-+ !starts_with(iter->ref.refname, "refs/"))
++ if (!starts_with(iter->ref.refname, "refs/"))
+ continue;
+
+ if (iter->prefix &&
@@ t/t0610-reftable-basics.sh (new)
+ test_cmp expect actual
+}
+
-+# A fix for this is in flight via jc/reftable-core-fsync.
-+test_expect_failure 'ref transaction: writes are synced' '
++test_expect_success 'ref transaction: writes are synced' '
+ test_when_finished "rm -rf repo" &&
+ git init repo &&
+ test_commit -C repo initial &&
+
+ GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
+ GIT_TEST_FSYNC=true \
-+ git -C repo -c core.fsync=reference update-ref refs/heads/branch HEAD &&
++ git -C repo -c core.fsync=reference \
++ -c core.fsyncMethod=fsync update-ref refs/heads/branch HEAD &&
+ check_fsync_events trace2.txt <<-EOF
+ "name":"hardware-flush","count":2
+ EOF
@@ t/t0610-reftable-basics.sh (new)
+
+for umask in 002 022
+do
-+ # A fix for this is in flight via ps/reftable-compacted-tables-permission-fix.
-+ test_expect_failure POSIXPERM 'pack-refs: honors core.sharedRepository' '
++ test_expect_success POSIXPERM 'pack-refs: honors core.sharedRepository' '
+ test_when_finished "rm -rf repo" &&
+ (
+ umask $umask &&
@@ t/t0610-reftable-basics.sh (new)
+ '
+done
+
-+# A fix for this is in flight.
-+test_expect_failure 'packed-refs: writes are synced' '
++test_expect_success 'packed-refs: writes are synced' '
+ test_when_finished "rm -rf repo" &&
+ git init repo &&
+ test_commit -C repo initial &&
+ test_line_count = 2 table-files &&
+
++ : >trace2.txt &&
+ GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
+ GIT_TEST_FSYNC=true \
-+ git -C repo -c core.fsync=reference pack-refs &&
++ git -C repo -c core.fsync=reference \
++ -c core.fsyncMethod=fsync pack-refs &&
+ check_fsync_events trace2.txt <<-EOF
+ "name":"hardware-flush","count":2
+ EOF
2: 146bb95c03 = 2: 30e5feb28c ci: add jobs to test with the reftable backend
base-commit: 235986be822c9f8689be2e9a0b7804d0b1b6d821
--
2.43.GIT
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-02-07 7:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 8:05 [PATCH 0/2] refs: introduce reftable backend Patrick Steinhardt
2024-01-30 8:05 ` [PATCH 1/2] " Patrick Steinhardt
2024-02-01 15:17 ` Karthik Nayak
2024-02-02 8:30 ` Patrick Steinhardt
2024-02-02 10:52 ` Patrick Steinhardt
2024-01-30 8:05 ` [PATCH 2/2] ci: add jobs to test with the " Patrick Steinhardt
2024-01-30 22:08 ` [PATCH 0/2] refs: introduce " Junio C Hamano
2024-02-02 8:38 ` [PATCH v2 " Patrick Steinhardt
2024-02-02 8:38 ` [PATCH v2 1/2] " Patrick Steinhardt
2024-02-02 8:38 ` [PATCH v2 2/2] ci: add jobs to test with the " Patrick Steinhardt
2024-02-02 13:02 ` [PATCH v2 0/2] refs: introduce " Karthik Nayak
2024-02-03 20:41 ` Junio C Hamano
2024-02-04 6:00 ` Patrick Steinhardt
2024-02-05 6:02 ` [PATCH v3 " Patrick Steinhardt
2024-02-05 6:02 ` [PATCH v3 1/2] " Patrick Steinhardt
2024-02-05 6:02 ` [PATCH v3 2/2] ci: add jobs to test with the " Patrick Steinhardt
2024-02-05 13:10 ` [PATCH v3 0/2] refs: introduce " Karthik Nayak
2024-02-07 7:20 ` Patrick Steinhardt [this message]
2024-02-07 7:20 ` [PATCH v4 1/2] " Patrick Steinhardt
2024-02-07 22:31 ` Jeff King
2024-02-08 5:11 ` Patrick Steinhardt
2024-02-15 5:39 ` Jeff King
2024-02-07 7:20 ` [PATCH v4 2/2] ci: add jobs to test with the " Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1707288261.git.ps@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hanwen@google.com \
--cc=karthik.188@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).