You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/03/30 07:59:58 UTC

[GitHub] [couchdb] garrensmith opened a new pull request #2731: All docs raw collation

garrensmith opened a new pull request #2731: All docs raw collation
URL: https://github.com/apache/couchdb/pull/2731
 
 
   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   Change `_all_docs` to do raw collation instead of view collation. 
   
   ## Testing recommendations
   
   `make check-fdb` should pass.
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those issues or pull requests here.  -->
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] garrensmith merged pull request #2731: All docs raw collation

Posted by GitBox <gi...@apache.org>.
garrensmith merged pull request #2731: All docs raw collation
URL: https://github.com/apache/couchdb/pull/2731
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] iilyak commented on a change in pull request #2731: All docs raw collation

Posted by GitBox <gi...@apache.org>.
iilyak commented on a change in pull request #2731: All docs raw collation
URL: https://github.com/apache/couchdb/pull/2731#discussion_r400032851
 
 

 ##########
 File path: src/fabric/src/fabric2_util.erl
 ##########
 @@ -294,13 +294,9 @@ uuid() ->
     to_hex(crypto:strong_rand_bytes(16)).
 
 
-encode_all_doc_key(null) -> <<>>;
-encode_all_doc_key(true) -> <<>>;
-encode_all_doc_key(false) -> <<>>;
-encode_all_doc_key(N) when is_number(N) -> <<>>;
 encode_all_doc_key(B) when is_binary(B) -> B;
-encode_all_doc_key(L) when is_list(L) -> <<255>>;
-encode_all_doc_key({O}) when is_list(O) -> <<255>>.
+encode_all_doc_key(Term) when Term < <<>> -> <<>>;
+encode_all_doc_key(_) -> <<255>>.
 
 Review comment:
   I didn't notice the `encode_all_doc_key(B) when is_binary(B) -> B;` clause in the diff. Now it is clear.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] iilyak commented on a change in pull request #2731: All docs raw collation

Posted by GitBox <gi...@apache.org>.
iilyak commented on a change in pull request #2731: All docs raw collation
URL: https://github.com/apache/couchdb/pull/2731#discussion_r400021033
 
 

 ##########
 File path: src/fabric/src/fabric2_util.erl
 ##########
 @@ -294,13 +294,9 @@ uuid() ->
     to_hex(crypto:strong_rand_bytes(16)).
 
 
-encode_all_doc_key(null) -> <<>>;
-encode_all_doc_key(true) -> <<>>;
-encode_all_doc_key(false) -> <<>>;
-encode_all_doc_key(N) when is_number(N) -> <<>>;
 encode_all_doc_key(B) when is_binary(B) -> B;
-encode_all_doc_key(L) when is_list(L) -> <<255>>;
-encode_all_doc_key({O}) when is_list(O) -> <<255>>.
+encode_all_doc_key(Term) when Term < <<>> -> <<>>;
+encode_all_doc_key(_) -> <<255>>.
 
 Review comment:
   I don't understand why we are always returning `<<255>>` here. If we are ignoring the term itself we would have 
   `start_key == end_key == <<255>>` here https://github.com/apache/couchdb/blob/prototype/fdb-layer/src/chttpd/src/chttpd_db.erl#L952:L960. I would understand if we would have:
   ```
   encode_all_doc_key(Term) when Term < <<>> -> <<>>;
   encode_all_doc_key(B) when is_binary(B) -> B;
   encode_all_doc_key(_) -> <<255>>.
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services