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 2024/05/17 00:11:12 UTC
(couchdb) branch check-for-vdu-in-quickjs-scanner created (now 076c94bd9)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch check-for-vdu-in-quickjs-scanner
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at 076c94bd9 Handle missing VDU better in In QuickJS scanner plugin
This branch includes the following new commits:
new 076c94bd9 Handle missing VDU better in In QuickJS scanner plugin
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.
(couchdb) 01/01: Handle missing VDU better in In QuickJS scanner plugin
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch check-for-vdu-in-quickjs-scanner
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 076c94bd9f54033306309649d15cbc3d04588fe7
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Thu May 16 20:08:57 2024 -0400
Handle missing VDU better in In QuickJS scanner plugin
Previously we tried to run the VDU query prompt even if there was not VDU. That
would have yielded a match anyway as both result in an error, but it added
noise to the logs.
Handle the missing VDU like we handle the missing filters in
filter_doc_validate.
---
src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl b/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl
index a30b7b687..f6521303c 100644
--- a/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl
+++ b/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl
@@ -401,6 +401,9 @@ vdu_load(#st{qjs_proc = Qjs, sm_proc = Sm}, VDU) ->
false -> throw({validate, {vdu, QjsRes, SmRes}})
end.
+vdu_doc_validate(#st{}, _DDocId, undefined, _Doc) ->
+ % No VDU
+ ok;
vdu_doc_validate(#st{} = St, DDocId, _VDU, Doc) ->
#st{qjs_proc = Qjs, sm_proc = Sm} = St,
QjsRes = vdu_doc(Qjs, DDocId, Doc),