diff options
author | Russell Branca <chewbranca@apache.org> | 2021-09-22 16:42:05 -0700 |
---|---|---|
committer | Russell Branca <chewbranca@apache.org> | 2021-09-22 16:42:05 -0700 |
commit | 96c462e5f639044439ec8ffb4f65f7d96153b7d7 (patch) | |
tree | 62bd8be19e92cd5b3b4fde25e070fd836bf34936 | |
parent | 01305b518dda09330e924e29ab4c37b983033173 (diff) | |
download | couchdb-96c462e5f639044439ec8ffb4f65f7d96153b7d7.tar.gz |
Fix pread logic
-rw-r--r-- | src/couch/src/couch_file.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couch/src/couch_file.erl b/src/couch/src/couch_file.erl index 0cfc91ec8..e7fd229ef 100644 --- a/src/couch/src/couch_file.erl +++ b/src/couch/src/couch_file.erl @@ -199,7 +199,9 @@ pread_binary(Fd, Pos) -> {ok, iolist_to_binary(L)}. -pread_iolist(#ioq_file{parallel=true, fd=File}, Pos) -> +pread_iolist(#ioq_file{parallel=true, fd=Fd}, Pos) -> + Limit = get_pread_limit(), + File = #file{fd=Fd, is_sys=false, pread_limit=Limit}, {LenIolist, NextPos} = read_raw_iolist_int(File, Pos, 4), case iolist_to_binary(LenIolist) of <<1:1/integer,Len:31/integer>> -> % an MD5-prefixed term |