From: Patrick Steinhardt <ps@pks.im>
To: Toon claes <toon@iotcl.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/4] reftable/stack: register compacted tables as tempfiles
Date: Thu, 7 Mar 2024 13:58:37 +0100 [thread overview]
Message-ID: <Zem5_Z171kzCkRK5@tanuki> (raw)
In-Reply-To: <87sf12fc7z.fsf@to1.studio>
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
On Thu, Mar 07, 2024 at 01:38:56PM +0100, Toon claes wrote:
> > diff --git a/reftable/stack.c b/reftable/stack.c
> > index 977336b7d5..40129da16c 100644
> > --- a/reftable/stack.c
> > +++ b/reftable/stack.c
> > @@ -827,51 +827,57 @@ uint64_t reftable_stack_next_update_index(struct reftable_stack *st)
> >
> > static int stack_compact_locked(struct reftable_stack *st,
> > size_t first, size_t last,
> > - struct strbuf *temp_tab,
> > - struct reftable_log_expiry_config *config)
> > + struct reftable_log_expiry_config *config,
> > + struct tempfile **temp_table_out)
> > {
> > struct strbuf next_name = STRBUF_INIT;
> > - int tab_fd = -1;
> > + struct strbuf table_path = STRBUF_INIT;
> > struct reftable_writer *wr = NULL;
> > + struct tempfile *temp_table;
> > + int temp_table_fd;
>
> Just one small nit, if you don't mind? In PATCH 2/4 you use
> `struct tempfile *tab_file` and `int tab_fd`. I would like to see
> consistency and use similar names. Personally I don't like table being
> shortened to "tab", and I think you feel the same as you've renamed the
> parameter from this function.
Yeah, I'm always a proponent of descriptive, unabbreviated names and
would thus rather want to use "temp_table" or something like that. But
in 2/4 I decided to stick with "tab_file" because there is a bunch of
already existing variables in that function which are called similar --
"temp_tab_file_name", "tab_file_name" and "tab_fd". But renaming all of
them to ensure function-level consistency would create a lot of churn.
I'll thus instead rename variables over here to their abbreviated
versions.
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-03-07 12:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 11:10 [PATCH 0/4] reftable/stack: register temporary files Patrick Steinhardt
2024-03-04 11:10 ` [PATCH 1/4] lockfile: report when rollback fails Patrick Steinhardt
2024-03-05 22:09 ` Justin Tobler
2024-03-06 12:00 ` Patrick Steinhardt
2024-03-04 11:10 ` [PATCH 2/4] reftable/stack: register new tables as tempfiles Patrick Steinhardt
2024-03-05 22:30 ` Justin Tobler
2024-03-06 11:59 ` Patrick Steinhardt
2024-03-06 16:34 ` Justin Tobler
2024-03-06 16:36 ` Junio C Hamano
2024-03-07 6:17 ` Patrick Steinhardt
2024-03-07 17:59 ` Junio C Hamano
2024-03-07 20:54 ` Patrick Steinhardt
2024-03-07 21:06 ` Junio C Hamano
2024-03-04 11:10 ` [PATCH 3/4] reftable/stack: register lockfiles during compaction Patrick Steinhardt
2024-03-05 23:30 ` Justin Tobler
2024-03-06 11:59 ` Patrick Steinhardt
2024-03-06 16:39 ` Junio C Hamano
2024-03-06 19:57 ` Justin Tobler
2024-03-04 11:10 ` [PATCH 4/4] reftable/stack: register compacted tables as tempfiles Patrick Steinhardt
2024-03-07 12:38 ` Toon claes
2024-03-07 12:58 ` Patrick Steinhardt [this message]
2024-03-07 13:10 ` [PATCH v2 0/4] reftable/stack: register temporary files Patrick Steinhardt
2024-03-07 13:10 ` [PATCH v2 1/4] lockfile: report when rollback fails Patrick Steinhardt
2024-03-07 13:10 ` [PATCH v2 2/4] reftable/stack: register new tables as tempfiles Patrick Steinhardt
2024-03-07 13:10 ` [PATCH v2 3/4] reftable/stack: register lockfiles during compaction Patrick Steinhardt
2024-03-07 13:10 ` [PATCH v2 4/4] reftable/stack: register compacted tables as tempfiles 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zem5_Z171kzCkRK5@tanuki \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=toon@iotcl.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.