Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 54077 invoked from network); 16 Dec 2008 13:42:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Dec 2008 13:42:58 -0000 Received: (qmail 29886 invoked by uid 500); 16 Dec 2008 13:43:10 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 29857 invoked by uid 500); 16 Dec 2008 13:43:10 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 29848 invoked by uid 99); 16 Dec 2008 13:43:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 05:43:10 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 13:42:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BFADA23888A5; Tue, 16 Dec 2008 05:42:36 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r727050 - /couchdb/trunk/src/couchdb/couch_file.erl Date: Tue, 16 Dec 2008 13:42:36 -0000 To: commits@couchdb.apache.org From: jan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081216134236.BFADA23888A5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jan Date: Tue Dec 16 05:42:35 2008 New Revision: 727050 URL: http://svn.apache.org/viewvc?rev=727050&view=rev Log: do not fail on heavily loaded systems. wait forever for syscalls to return Modified: couchdb/trunk/src/couchdb/couch_file.erl Modified: couchdb/trunk/src/couchdb/couch_file.erl URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_file.erl?rev=727050&r1=727049&r2=727050&view=diff ============================================================================== --- couchdb/trunk/src/couchdb/couch_file.erl (original) +++ couchdb/trunk/src/couchdb/couch_file.erl Tue Dec 16 05:42:35 2008 @@ -56,7 +56,7 @@ %%---------------------------------------------------------------------- pread(Fd, Pos, Bytes) when Bytes > 0 -> - gen_server:call(Fd, {pread, Pos, Bytes}). + gen_server:call(Fd, {pread, Pos, Bytes}, infinity). %%---------------------------------------------------------------------- @@ -67,7 +67,7 @@ %%---------------------------------------------------------------------- pwrite(Fd, Pos, Bin) -> - gen_server:call(Fd, {pwrite, Pos, Bin}). + gen_server:call(Fd, {pwrite, Pos, Bin}, infinity). %%---------------------------------------------------------------------- %% Purpose: To append a segment of zeros to the end of the file. @@ -78,7 +78,7 @@ %%---------------------------------------------------------------------- expand(Fd, Bytes) when Bytes > 0 -> - gen_server:call(Fd, {expand, Bytes}). + gen_server:call(Fd, {expand, Bytes}, infinity). %%---------------------------------------------------------------------- @@ -135,7 +135,7 @@ % length in bytes bytes(Fd) -> - gen_server:call(Fd, bytes). + gen_server:call(Fd, bytes, infinity). %%---------------------------------------------------------------------- %% Purpose: Truncate a file to the number of bytes. @@ -144,7 +144,7 @@ %%---------------------------------------------------------------------- truncate(Fd, Pos) -> - gen_server:call(Fd, {truncate, Pos}). + gen_server:call(Fd, {truncate, Pos}, infinity). %%---------------------------------------------------------------------- %% Purpose: Ensure all bytes written to the file are flushed to disk.