From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Shawn Pearce <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>,
Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: reftable [v2]: new ref storage format
Date: Wed, 19 Jul 2017 16:02:08 +0200 [thread overview]
Message-ID: <87k234tti7.fsf@gmail.com> (raw)
In-Reply-To: <CAJo=hJuP9GdudFsA_ToFQwx-zESaDHRDXHLxmvAXSX5CKmh7JQ@mail.gmail.com>
On Tue, Jul 18 2017, Shawn Pearce jotted:
> On Mon, Jul 17, 2017 at 12:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Shawn Pearce <spearce@spearce.org> writes:
>>> where `time_sec` is the update time in seconds since the epoch. The
>>> `reverse_int32` function inverses the value so lexographical ordering
>>> the network byte order time sorts more recent records first:
>>>
>>> reverse_int(int32 t) {
>>> return 0xffffffff - t;
>>> }
>>
>> Is 2038 an issue, or by that time we'd all be retired together with
>> this file format and it won't be our problem?
>
> Based on discussion with Michael Haggerty, this is now an 8 byte field
> storing microseconds since the epoch. We should be good through year
> 9999.
I think this should be s/microseconds/nanoseconds/, not because there's
some great need to get better resolution than nanoseconds, but because:
a) We already have WIP code (bp/fsmonitor) that's storing 64 bit
nanoseconds since the epoch, albeit for the index, not for refs.
b) There are several filesystems that have nanosecond resolution now,
and it's likely more will start using that.
Thus:
x) If you use such a filesystem you'll lose time resolution with this
ref backend v.s. storing them on disk, which isn't itself a big
deal, but more importantly you lose 1=1 time mapping as you
transition and convert between the two.
y) Our own code will need to juggle second resolution epochs
(traditional FSs, any 32bit epoch format), microseconds (this
proposal), and nanoseconds (new FSs, bp/fsmonitor) internally in
various places.
Let's not make this harder than it needs to be and just settle on
two epoch resolution formats if we can help it, and so far it looks
like we can.
The downside is that instead of lasting through the year 9999 the 64 bit
nanosecond resolution is only good up until the year 2554, which I think
is an acceptable trade-off given the above.
next prev parent reply other threads:[~2017-07-19 14:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 15:01 reftable [v2]: new ref storage format Shawn Pearce
2017-07-17 18:53 ` Stefan Beller
2017-07-17 19:04 ` Shawn Pearce
2017-07-17 19:56 ` Stefan Beller
2017-07-17 19:51 ` Junio C Hamano
2017-07-18 20:54 ` Shawn Pearce
2017-07-19 14:02 ` Ævar Arnfjörð Bjarmason [this message]
2017-07-23 21:46 ` Shawn Pearce
2017-07-23 23:47 ` Ævar Arnfjörð Bjarmason
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=87k234tti7.fsf@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
--cc=spearce@spearce.org \
/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).