Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-44933

Control the number of config checks that ns_server runs against memcached

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      ns_memcached registers a listener to certain kinds of config changes and then send a check_config message to itself when something interesting happens (like a new collection gets created): https://github.com/couchbase/ns_server/blob/master/src/ns_memcached.erl#L677.

                          chronicle_compat:subscribe_to_key_change(
                            fun (cluster_compat_version) ->
                                    true;
                                (Key) ->
                                    case collections:key_match(Key) of
                                        {true, Bucket} ->
                                            true;
                                        _ ->
                                            false
                                    end
                            end,
                            fun (Key) ->
                                    ?log_debug(
                                       "Triggering config check due to event on "
                                       "key ~p", [Key]),
                                    Self ! check_config
                            end),
      

      Each check_config message results in a new check_config message getting scheduled - and so the number of messages getting sent and then acted upon grows with every change to the collection manifest.

      We need to distinguish between scheduled and one-time config checks or do something to not continually accumulate many chains of config check messages.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              artem Artem Stemkovski
              dfinlay Dave Finlay
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty