git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] resolved deltas

From
Jeff King <peff@peff.net>
Date
Aug 29, 2014, 20:55 UTC
Message-ID
<20140829205538.GD29456@peff.net>
In-Reply-To
<xmqq1ts08ax2.fsf@gitster.dls.corp.google.com>
On Thu, Aug 28, 2014 at 04:14:01PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > On Thu, Aug 28, 2014 at 06:08:21PM -0400, Jeff King wrote:
> >
> >> Interesting. I couldn't convince Helgrind to catch such a case...
> >
> > Ugh. It helps if you actually helgrind the git binary, and not the
> > shell-script from bin-wrappers. I can easily replicate the problem now.
> > The patch I just posted seems to fix it (at least it has been running in
> > a loop for over a minute with no failures, whereas before it took only a
> > few seconds to provoke a failure).
> 
> Thanks for digging.  I'll pick it up and may comment on it in
> tomorrow's cycle (it is a bit too late for today's cycle,
> unfortunately).
Here's a proposed series.
  [1/2]: index-pack: fix race condition with duplicate bases
  [2/2]: index-pack: handle duplicate base objects gracefully
There are two big changes from what has been posted already:
  1. While writing up the commit message, I realized that this can't
     ever happen for OFS_DELTA (neither the race condition, nor the
     duplicate resolution) because offsets by definition point to a
     unique entry in our object_entry array. So even if we have multiple
     copies of the base object in the pack, there's only one possible
     base for an OFS_DELTA.
  2. René's original patch just does nothing for a delta which has
     already been resolved, and continues through the function to try
     any OFS_DELTA objects. If there isn't one, we return NULL to say
     "nothing left to resolve". But that's not quite true. There may
     have been other REF_DELTA against the same base, but we never
     incremented our counter to find it.
     Instead, we need to actually increment our counter and loop again
     to see if there's another REF_DELTA to handle.
-Peff
Previous: Junio C HamanoNext: Jeff King
Message 14 of 30 in “[BUG] resolved deltas”
  1. Petr StodulkaAug 21, 2014
  2. Petr StodulkaAug 21, 2014
  3. Martin von GagernAug 22, 2014
  4. René ScharfeAug 23, 2014
  5. Jeff KingAug 23, 2014
  6. Jeff KingAug 23, 2014
  7. Jeff KingAug 23, 2014
  8. René ScharfeAug 25, 2014
  9. Jeff KingAug 28, 2014
  10. Jeff KingAug 28, 2014
  11. Jeff KingAug 28, 2014
  12. Jeff KingAug 28, 2014
  13. Junio C HamanoAug 28, 2014
  14. Jeff KingAug 29, 2014
  15. 1/2 index-pack: fix race condition with duplicate basesJeff King, Aug 29, 2014
  16. 2/2 index-pack: handle duplicate base objects gracefullyJeff King, Aug 29, 2014
  17. Junio C HamanoAug 29, 2014
  18. Jeff KingAug 29, 2014
  19. Shawn PearceAug 30, 2014
  20. Jeff KingAug 30, 2014
  21. René ScharfeAug 30, 2014
  22. Jeff KingAug 31, 2014
  23. René ScharfeAug 31, 2014
  24. Shawn PearceAug 31, 2014
  25. Jeff KingAug 31, 2014
  26. Junio C HamanoAug 31, 2014
  27. 3/2 t5309: mark delta-cycle failover tests as passingJeff King, Aug 30, 2014
  28. Jeff KingAug 31, 2014
  29. Junio C HamanoSep 2, 2014
  30. Shawn PearceAug 25, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.