You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2021/09/27 20:09:41 UTC

[couchdb] 02/02: Revert "HACK: enable parallel readers"

This is an automated email from the ASF dual-hosted git repository.

chewbranca pushed a commit to branch chewbranca-ioq-experiments-rebase
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 2be828fa79d5f2585497f913d4be6e6e44ace4a8
Author: Russell Branca <ch...@apache.org>
AuthorDate: Mon Sep 27 13:09:23 2021 -0700

    Revert "HACK: enable parallel readers"
    
    This reverts commit 01305b518dda09330e924e29ab4c37b983033173.
---
 src/couch/src/couch_file.erl | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/src/couch/src/couch_file.erl b/src/couch/src/couch_file.erl
index 0cfc91e..e63b583 100644
--- a/src/couch/src/couch_file.erl
+++ b/src/couch/src/couch_file.erl
@@ -82,8 +82,7 @@ open(Filepath, Options, IOQPid0) ->
                 IOQPid0
         end,
         Tab = gen_server:call(Fd, get_cache_ref),
-        ParallelReads = config:get_boolean("couchdb", "couch_file_parallel", false),
-        {ok, #ioq_file{fd=Fd, ioq=IOQPid, tab=Tab, parallel=ParallelReads}};
+        {ok, #ioq_file{fd=Fd, ioq=IOQPid, tab=Tab}};
     ignore ->
         % get the error
         receive
@@ -199,17 +198,6 @@ pread_binary(Fd, Pos) ->
     {ok, iolist_to_binary(L)}.
 
 
-pread_iolist(#ioq_file{parallel=true, fd=File}, Pos) ->
-    {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
-            {Md5AndIoList, _} = read_raw_iolist_int(File, NextPos, Len+16),
-            {Md5, IoList} = extract_md5(Md5AndIoList),
-            {ok, verify_md5(File, Pos, IoList, Md5)};
-        <<0:1/integer,Len:31/integer>> ->
-            {Iolist, _} = read_raw_iolist_int(File, NextPos, Len),
-            {ok, Iolist}
-    end;
 pread_iolist(Fd, Pos) ->
     case load_from_cache(Fd, Pos) of
         {ok, IoList, Md5} ->