This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/prototype/fdb-layer by this
push:
new 3fba9ff Fix couch_jobs after recent db re-creation commit
3fba9ff is described below
commit 3fba9ff5bea733b4c722d2bb4f924afe416f6e35
Author: Nick Vatamaniuc <[email protected]>
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,