diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2020-02-21 21:49:14 -0500 |
---|---|---|
committer | Paul J. Davis <paul.joseph.davis@gmail.com> | 2020-03-02 12:26:22 -0600 |
commit | 47b6b3378221ed52a71469826bd87eca98010fc0 (patch) | |
tree | b803d4165288c44bf2285fbc47076173f25b845e | |
parent | 2e13cffa24042f54ed4b7cd522020c7afc0df48f (diff) | |
download | couchdb-47b6b3378221ed52a71469826bd87eca98010fc0.tar.gz |
Do not use the ddoc cache to load _changes filter design documents
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.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chttpd/src/chttpd_changes.erl b/src/chttpd/src/chttpd_changes.erl index b2084fab6..3a13f81e4 100644 --- a/src/chttpd/src/chttpd_changes.erl +++ b/src/chttpd/src/chttpd_changes.erl @@ -309,7 +309,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. |