From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22540 invoked from network); 26 Jul 2021 01:24:06 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 26 Jul 2021 01:24:06 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Sun Jul 25 20:45:38 -0400 2021 Message-ID: <0C78F8861F62859962D0700334F86680@felloff.net> Date: Mon, 26 Jul 2021 02:45:28 +0200 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: <07AAA303A77F5CCCA03612746744A0DC@eigenstate.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: content-addressed abstract pipelining realtime-java JSON core-aware event high-performance framework Subject: Re: [9front] git/fetch: be more robust Reply-To: 9front@9front.org Precedence: bulk so this is like a race condition? depending how fast the reader is able to process the message? the other side of the pipeline is reading the hash and then fails to locate it in git/fs because it has not been indexed yet when it reads too fast? is this just a theory or is there proof that the problem is well understood? if(hparse(&want[nref], sp[0]) == -1) sysfatal("invalid hash %s", sp[0]); - if (resolveremote(&have[nref], sp[1]) == -1) + if (resolveremote(&have[nref], ref[nref]) == -1) memset(&have[nref], 0, sizeof(have[nref])); - print("remote %s %H local %H\n", sp[1], want[nref], have[nref]); nref++; wouldnt it be better to just estrdup() at the print(), then it seems cleaner and makes the diff smaller... like: if (resolveremote(&have[nref], sp[1]) == -1) memset(&have[nref], 0, sizeof(have[nref])); - print("remote %s %H local %H\n", sp[1], want[nref], have[nref]); + ref[nref] = estrdup(sp[1]); nref++ -- cinap