git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: [JGIT RFC PATCH 2/2] Rewrite WindowCache to be easier to follow and maintain
Date: Wed, 29 Apr 2009 10:16:59 -0700	[thread overview]
Message-ID: <20090429171659.GF23604@spearce.org> (raw)
In-Reply-To: <200904290120.00039.robin.rosenberg.lists@dewire.com>

Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> > diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java b/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java
> > +	private void gc() {
> > +		R r;
> > +		while ((r = (R) queue.poll()) != null) {
> > +			// Sun's Java 5 and 6 implementation have a bug where a Reference
> > +			// can be enqueued and dequeued twice on the same reference queue
> > +			// due to a race condition within ReferenceQueue.enqueue(Reference).
> 
> Reference to the official Sun bug? Might help if someone wants to
> implement a flag to avoid this (if necessary...)

Actually, this is a new bug.  I tried looking through BugParade
but nobody has mentioned or discovered this before.

I submitted a bug report yesterday, but they have yet to publish it.

So, no link.
 
> > +	protected int hash(final int packHash, final long position) {
> > +		return (packHash + (int) (position >>> 4)) >>> 1;
> > +	}
>
> Since we never use the baselass this one isn't covered... ok anyway I think.

This particular implementation I planned on using in
UnpackedObjectCache if I rewrote it using OffsetCache.

But I could also just make it abstract here.  Maybe that is the
better approach.  I'll amend that into the series.
 
-- 
Shawn.

  parent reply	other threads:[~2009-04-29 17:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28  2:26 [JGIT PATCH 1/2] Don't use ByteWindows when checking pack file headers/footers Shawn O. Pearce
2009-04-28  2:26 ` [JGIT RFC PATCH 2/2] Rewrite WindowCache to be easier to follow and maintain Shawn O. Pearce
2009-04-28 15:28   ` Shawn O. Pearce
2009-04-28 23:19   ` Robin Rosenberg
2009-04-28 23:30     ` Shawn O. Pearce
2009-04-29 17:16     ` Shawn O. Pearce [this message]
2009-04-30  7:34       ` Ferry Huberts (Pelagic)
2009-05-06 14:15       ` [PATCH] Link to the Sun JVM bug mentioned in OffsetCache Shawn O. Pearce

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=20090429171659.GF23604@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg.lists@dewire.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 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 NNTP newsgroup(s).