From d172007547cd63da80996875a5b19be3aeddafba Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Tue, 16 Dec 2008 13:42:35 +0000 Subject: do not fail on heavily loaded systems. wait forever for syscalls to return git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@727050 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_file.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl index efca523a..4ed9dc05 100644 --- a/src/couchdb/couch_file.erl +++ b/src/couchdb/couch_file.erl @@ -56,7 +56,7 @@ open(Filepath, Options) -> %%---------------------------------------------------------------------- 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 @@ pread(Fd, Pos, Bytes) when Bytes > 0 -> %%---------------------------------------------------------------------- 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 @@ pwrite(Fd, Pos, Bin) -> %%---------------------------------------------------------------------- expand(Fd, Bytes) when Bytes > 0 -> - gen_server:call(Fd, {expand, Bytes}). + gen_server:call(Fd, {expand, Bytes}, infinity). %%---------------------------------------------------------------------- @@ -135,7 +135,7 @@ pread_binary(Fd, Pos) -> % 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 @@ bytes(Fd) -> %%---------------------------------------------------------------------- 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. -- cgit v1.2.3