nickva commented on code in PR #4962:
URL: https://github.com/apache/couchdb/pull/4962#discussion_r1455863075


##########
src/couch/src/couch_multidb_changes.erl:
##########
@@ -119,6 +140,12 @@ handle_call({checkpoint, DbName, EndSeq}, {Pid, _Tag} = 
_From, #state{tid = Ets}
 handle_cast({resume_scan, DbName}, State) ->
     {noreply, resume_scan(DbName, State)}.
 
+handle_info({'$couch_event', Dbs, updated}, #state{dbs = Dbs, tref = 
undefined} = State) ->

Review Comment:
   Yeah, we explicitly match it as we want to handle only updated events 
related to <<"_dbs">>. 
   
   We're reusing the already existing subscription to couch_event here and 
we'll get message for all the database shard events on the node (the ones with 
the suffix we care about, without the suffix, metadata ones <<"_dbs">>, 
<<"_users">>, etc.) So, in the first two `$couch_event` message handlers we 
only handle the case when the `<<"_dbs">>` was updated. Then we fall through 
and we check for the suffix we care an otherwise just ignore the change.



-- 
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