You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2018/03/28 21:01:19 UTC

[couchdb] branch fix-shard-substitution updated (12a3b21 -> cb34c58)

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

davisp pushed a change to branch fix-shard-substitution
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


    omit 12a3b21  Fix shard substitution in changes feeds
     add f0887c1  Allow couch_os_daemons to live in directories with spaces
     add 6f987ae  Merge branch 'master' into daemon-spaces
     add b163663  Merge branch 'master' into daemon-spaces
     add c300673  Merge pull request #1242 from apache/daemon-spaces
     add 266c56b  Various top-level directory cleanups
     add 25de7b5  Merge pull request #1240 from apache/cleanup
     add 0e1cdef  Fix couch peruser test suite (#1247)
     add 0074b4f  fix: more reliable password scheme tests
     add f6fc285  add test covering loading admins from config
     new cb34c58  Fix shard substitution in changes feeds

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (12a3b21)
            \
             N -- N -- N   refs/heads/fix-shard-substitution (cb34c58)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 COMMITTERS.md                                 |  51 +------
 Makefile                                      |   2 +-
 Makefile.win                                  |   2 +-
 Vagrantfile                                   |  69 ---------
 introspect => build-aux/introspect            |   0
 license.skip                                  | 204 --------------------------
 src/couch/src/couch_os_daemons.erl            |   2 +-
 src/couch/test/couch_auth_cache_tests.erl     |  16 +-
 src/couch_peruser/test/couch_peruser_test.erl | 139 ++++++++----------
 test/javascript/couch_test_runner.js          |   4 +-
 test/javascript/tests/users_db_security.js    |  33 ++++-
 11 files changed, 123 insertions(+), 399 deletions(-)
 delete mode 100644 Vagrantfile
 rename introspect => build-aux/introspect (100%)
 delete mode 100644 license.skip

-- 
To stop receiving notification emails like this one, please contact
davisp@apache.org.

[couchdb] 01/01: Fix shard substitution in changes feeds

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch fix-shard-substitution
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit cb34c58b07aaea9a362c8bcc82962ec9ea321134
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue Mar 27 10:55:48 2018 -0500

    Fix shard substitution in changes feeds
---
 src/mem3/src/mem3_rep.erl | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mem3/src/mem3_rep.erl b/src/mem3/src/mem3_rep.erl
index 942f8a8..3d91877 100644
--- a/src/mem3/src/mem3_rep.erl
+++ b/src/mem3/src/mem3_rep.erl
@@ -341,14 +341,12 @@ find_repl_doc(SrcDb, TgtUUIDPrefix) ->
     SrcUUID = couch_db:get_uuid(SrcDb),
     S = couch_util:encodeBase64Url(crypto:hash(md5, term_to_binary(SrcUUID))),
     DocIdPrefix = <<"_local/shard-sync-", S/binary, "-">>,
-    FoldFun = fun({DocId, {Rev0, {BodyProps}}}, _) ->
+    FoldFun = fun(#doc{id = DocId, body = {BodyProps}} = Doc, _) ->
         TgtUUID = couch_util:get_value(<<"target_uuid">>, BodyProps, <<>>),
         case is_prefix(DocIdPrefix, DocId) of
             true ->
                 case is_prefix(TgtUUIDPrefix, TgtUUID) of
                     true ->
-                        Rev = list_to_binary(integer_to_list(Rev0)),
-                        Doc = #doc{id=DocId, revs={0, [Rev]}, body={BodyProps}},
                         {stop, {TgtUUID, Doc}};
                     false ->
                         {ok, not_found}

-- 
To stop receiving notification emails like this one, please contact
davisp@apache.org.