Re: [quicwg/base-drafts] Cache git repo, draft references in Circle (#3009)

Mike Bishop <notifications@github.com> Tue, 10 September 2019 18:43 UTC

Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BAF811208B6 for <quic-issues@ietfa.amsl.com>; Tue, 10 Sep 2019 11:43:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.999
X-Spam-Level:
X-Spam-Status: No, score=-7.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UpL6MUklxJZU for <quic-issues@ietfa.amsl.com>; Tue, 10 Sep 2019 11:43:46 -0700 (PDT)
Received: from out-21.smtp.github.com (out-21.smtp.github.com [192.30.252.204]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D0445120832 for <quic-issues@ietf.org>; Tue, 10 Sep 2019 11:43:45 -0700 (PDT)
Date: Tue, 10 Sep 2019 11:43:44 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1568141025; bh=GF+/Y4zJ4nmS0c4hQJ0n3sffDwePIKNfINr0cv0RsLE=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=hPlD9Xf7btfiCEefUa+7lkYBX8ZHpEd3dT+CgRm2b4+yMyujlNwN3WXSSBH5N1N0J Q9hTpmsCYIaiac14jPo3oyEhCyDCkADT7nkduVxqR1NBbcIXHz3eKHj4qBlQ9VnDqv FPmRlidxqhmbs12/5TwjkHbfhub7+zmShxycqWDo=
From: Mike Bishop <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK4PO6T3ESB74WFU7BF3QUXXBEVBNHHB2OXHYQ@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/3009/c530068800@github.com>
In-Reply-To: <quicwg/base-drafts/pull/3009@github.com>
References: <quicwg/base-drafts/pull/3009@github.com>
Subject: Re: [quicwg/base-drafts] Cache git repo, draft references in Circle (#3009)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5d77eee0eeb4c_59453ff560ecd96c3844a3"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: MikeBishop
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/kDnpSAvDfXl8M1T5Jn4Jd3A92Y0>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Sep 2019 18:43:50 -0000

> We will always be picking up the cache that you create the first time `master` uses this build. And the references cache will be old in less than a week now, but that is the cache that will be used in perpetuity.

That would be true if we created a cache once and never wrote an updated one.  But we're not -- we're creating a fresher one each time we run.  We'll be picking up the cache from the *last* time master built, not the first.

Because each key is immutable once written, the keys *have* to be unique (epoch and revision).  But when we're searching by prefix, that doesn't mean it's going to use the oldest possible match.

>From https://circleci.com/docs/2.0/caching/#source-caching:
> If there are multiple matches, the **most recently generated cache** will be used.

Again, look at the actual behavior for builds on this branch:
- Build 12474 uses both caches from build 12461
- Build 12461 uses both caches from build 12459
- Build 12459 uses both caches from build 12457
- Build 12457 uses both caches from build 12455
- Build 12455 uses both caches from build 12453
- Build 12453 uses the git cache from build 12451 and creates the reference cache
- Build 12451 uses the git cache from build 12449
- Build 12449 creates the git cache

Each build creates a new cache instance, and each run uses:
- The most recent git cache for the current revision, or branch, or for master, or overall
- The most recent reference cache from any previous run

Sure, odds are that each stored cache only gets used once and then sits there collecting dust until Circle expires it 30 days later, which means we're not amortizing the time to create the cache over multiple future runs.  But the combined time to store a new cache instance and retrieve the latest cache instance is massively outweighed by the time saved by having that cache.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/3009#issuecomment-530068800