summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@apache.org>2020-02-21 21:49:14 -0500
committerNick Vatamaniuc <vatamane@apache.org>2020-02-21 22:03:04 -0500
commit3a3b3bdd8a7b1bde95595c18176ac2dbc40164ca (patch)
tree347b3828ef2b172b372ce27c1e1dd910500a30fe
parent8c75367cdfec1dca62d2dd1ee82f908fdb7b25f0 (diff)
downloadcouchdb-fix-changes-filter.tar.gz
Do not use the ddoc cache to load _changes filter design documentsfix-changes-filter
Since we started re-using the main changes feed transaction to open the docs https://github.com/apache/couchdb/commit/1bceb552594af404961e4ab8e6f88cffa1548f69, we also started to pass the transactional db handle to the ddoc cache. However ddoc cache uses a `spawn_monitor` to open docs, and since our transaction objects are tied to the owner process the open was failing with a `badarg` error from erlfdb. This could be seen by running the replication elixir tests: ``` make elixir tests=test/elixir/test/replication_test.exs:214 ```
-rw-r--r--src/chttpd/src/chttpd_changes.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chttpd/src/chttpd_changes.erl b/src/chttpd/src/chttpd_changes.erl
index 81fa90fab..31c39bfb7 100644
--- a/src/chttpd/src/chttpd_changes.erl
+++ b/src/chttpd/src/chttpd_changes.erl
@@ -393,7 +393,7 @@ check_fields(_Fields) ->
open_ddoc(Db, DDocId) ->
- case ddoc_cache:open_doc(Db, DDocId) of
+ case fabric2_db:open_doc(Db, DDocId, [ejson_body, ?ADMIN_CTX]) of
{ok, _} = Resp -> Resp;
Else -> throw(Else)
end.