You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2020/03/22 00:16:03 UTC

[couchdb] branch fix-couch-jobs updated (7bc333a -> 9c8d3fd)

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

vatamane pushed a change to branch fix-couch-jobs
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 7bc333a  Fix couch_jobs after recent db re-creation commit
     new 9c8d3fd  Fix couch_jobs after recent db re-creation commit

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   (7bc333a)
            \
             N -- N -- N   refs/heads/fix-couch-jobs (9c8d3fd)

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:
 src/fabric/src/fabric2_fdb.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[couchdb] 01/01: Fix couch_jobs after recent db re-creation commit

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

vatamane pushed a commit to branch fix-couch-jobs
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 9c8d3fd3bf5efd5a72121560dac6e319b59f524e
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Sat Mar 21 20:00:17 2020 -0400

    Fix couch_jobs after recent db re-creation commit
    
    The e520294c7ee3f55c3e8cc7d528ff37a5a93c800f commit inadvertently
    changed the `fabric2_fdb:refresh/1` head matching to accept db
    instances with no names. `couch_jobs` uses those but they are not
    cached in fabric2_server. So here we return to the previous matching
    rule where contexts without names don't get refreshed from the cache.
---
 src/fabric/src/fabric2_fdb.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/fabric/src/fabric2_fdb.erl b/src/fabric/src/fabric2_fdb.erl
index 5c72a17..f5f7bec 100644
--- a/src/fabric/src/fabric2_fdb.erl
+++ b/src/fabric/src/fabric2_fdb.erl
@@ -288,9 +288,10 @@ open(#{} = Db0, Options) ->
     load_validate_doc_funs(Db3).
 
 
-refresh(#{tx := undefined} = Db) ->
+% Match on `name` in the function head since some non-fabric2 db
+% objects might not have names and so they don't get cached
+refresh(#{tx := undefined, name := DbName} = Db) ->
     #{
-        name := DbName,
         uuid := UUID,
         md_version := OldVer
     } = Db,