jiahuili430 commented on code in PR #5120:
URL: https://github.com/apache/couchdb/pull/5120#discussion_r1667405122


##########
src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl:
##########
@@ -172,8 +172,9 @@ process_ddoc(#st{} = St, DbName, #doc{} = DDoc0) ->
         true ->
             St1 = start_or_reset_procs(St),

Review Comment:
   Why not put `St1` inside the try block?



##########
src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl:
##########
@@ -182,11 +183,12 @@ process_ddoc(#st{} = St, DbName, #doc{} = DDoc0) ->
             catch
                 throw:{validate, Error} ->
                     Meta = #{sid => SId, db => DbName, ddoc => DDocId},
-                    ?WARN("ddoc validation failed ~p", [Error], Meta),
-                    St1;
+                    validation_warning("ddoc validation failed ~p", Error, 
Meta),
+                    start_or_reset_procs(St1);

Review Comment:
   Why do we call `start_or_reset_procs(St1)` again?
   `start_or_reset_sm_proc/1` and `start_or_reset_qjs_proc/1` are recursive 
functions.
   They should return the state with some defined process.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to