eiri commented on a change in pull request #496: Couchdb 3287 pluggable storage 
engines
URL: https://github.com/apache/couchdb/pull/496#discussion_r118939883
 
 

 ##########
 File path: src/couch/src/couch_db.erl
 ##########
 @@ -1568,9 +1456,8 @@ open_doc_revs_int(Db, IdRevs, Options) ->
         IdRevs, LookupResults).
 
 open_doc_int(Db, <<?LOCAL_DOC_PREFIX, _/binary>> = Id, Options) ->
-    case couch_btree:lookup(Db#db.local_tree, [Id]) of
-    [{ok, {_, {Rev, BodyData}}}] ->
-        Doc = #doc{id=Id, revs={0, [?l2b(integer_to_list(Rev))]}, 
body=BodyData},
+    case couch_db_engine:open_local_docs(Db, [Id]) of
+    [#doc{} = Doc] ->
 
 Review comment:
   Just a suggestion: if `[not_found]` moved on a first match here, then there 
will be no need to guard on `Doc` to be `#doc` record.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to