git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH 3/4] Cap the number of open files in the WindowCache
Date: Tue, 17 Mar 2009 23:59:32 +0100	[thread overview]
Message-ID: <200903172359.32595.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <1237252570-8596-4-git-send-email-spearce@spearce.org>

tisdag 17 mars 2009 02:16:09 skrev "Shawn O. Pearce" <spearce@spearce.org>:

> If we detect a file open failure while opening a pack we halve
> the number of permitted open files and try again, until we reach
> a lower bound of 16 open files.  Needing to go lower may indicate
> a file descriptor leak in the host application.
...
> +			TRY_OPEN: for (;;) {
> +				try {
> +					openFileCount++;
> +					releaseMemory();
> +					runClearedWindowQueue();
> +					wp.openCount = 1;
> +					wp.cacheOpen();
> +					break;
> +				} catch (IOException ioe) {
> +					openFileCount--;
> +					if ("Too many open files".equals(ioe.getMessage())
> +							&& maxFileCount > 16) {

The output of getMessage isn't that simple to interpret. Here it is filename+" (Too many files open)",
and on other platforms it is probably something else. This goes for the message part of most exceptions
thrown from platform specific code like file i/o socket i/o etc. The type of exception is a FileNotFoundException,
btw.

I wonder whether  your code works on any platform.

  parent reply	other threads:[~2009-03-17 23:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17  1:16 [JGIT PATCH 0/4] Avoid using 1280 file descriptors Shawn O. Pearce
2009-03-17  1:16 ` [JGIT PATCH 1/4] Refactor WindowCache.reconfigure() to take a configuration object Shawn O. Pearce
2009-03-17  1:16   ` [JGIT PATCH 2/4] Update EGit plugin to use WindowCacheConfig Shawn O. Pearce
2009-03-17  1:16     ` [JGIT PATCH 3/4] Cap the number of open files in the WindowCache Shawn O. Pearce
2009-03-17  1:16       ` [JGIT PATCH 4/4] Teach WindowCacheConfig to read core.packedgit* settings from config Shawn O. Pearce
2009-03-17 22:59       ` Robin Rosenberg [this message]
2009-03-17 23:08         ` [JGIT PATCH 3/4] Cap the number of open files in the WindowCache Shawn O. Pearce
2009-03-18  0:09           ` Robin Rosenberg
2009-03-18  1:36             ` [JGIT PATCH 3/4 v2] " 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=200903172359.32595.robin.rosenberg.lists@dewire.com \
    --to=robin.rosenberg.lists@dewire.com \
    --cc=git@vger.kernel.org \
    --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.
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).