summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_file.erl
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2008-12-16 13:42:35 +0000
committerJan Lehnardt <jan@apache.org>2008-12-16 13:42:35 +0000
commitd172007547cd63da80996875a5b19be3aeddafba (patch)
treefcdf5b92982c567755d7687cfd24833f0157df6a /src/couchdb/couch_file.erl
parent853fdbb4bc4f907a3da3ccde20a34960a7d111f8 (diff)
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
Diffstat (limited to 'src/couchdb/couch_file.erl')
-rw-r--r--src/couchdb/couch_file.erl10
1 files changed, 5 insertions, 5 deletions
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.