Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-14386

ZDU banner logic generates Hazelcast traffic on every page load

    XMLWordPrintable

Details

    Description

      Issue Summary

      The ZDU plugin includes a warning banner which is shown on every page when a rolling upgrade is in progress. The logic behind checking for this includes a call to ClusterService#getNodeStates() in Bitbucket, which requires all nodes to respond. Checking the node states shouldn't be required for determining whether or not a rolling upgrade is in-progress so this process is generated unnecessary Hazelcast traffic.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Enable DEBUG logging for com.atlassian.stash.internal.cluster.HazelcastClusterService.
      2. Load any page in the Bitbucket UI.
      3. Observe getNodeStates() method being called (which requests information from all nodes).

      Expected Results

      ClusterService#getNodeStates() is not queried on every page (so no unnecessary Hazelcast traffic is generated).

      Actual Results

      If DEBUG logging is enabled for com.atlassian.stash.internal.cluster.HazelcastClusterService, logging similar to the following can be seen for all pages (multiple requests to getNodeStates()):

      2023-08-24 12:09:45,677 DEBUG [http-nio-7990-exec-9] admin @N4RJ8Xx729x43x0 19dqndd 0:0:0:0:0:0:0:1 "GET /dashboard HTTP/1.1" c.a.s.i.c.HazelcastClusterService Querying all nodes for status
      2023-08-24 12:09:45,678 DEBUG [hz.hazelcast.cached.thread-11]  c.a.s.i.c.HazelcastClusterService Received query for state; returning RUNNING
      2023-08-24 12:09:45,678 DEBUG [hz.hazelcast.async.thread-8]  c.a.s.i.c.HazelcastClusterService$NodeStatusCallback Success executing on Member [172.29.151.24]:5701 - 1e9db894-35ee-4fed-84e5-7f9f375c37ce this. Result: RUNNING
      2023-08-24 12:09:45,678 DEBUG [hz.hazelcast.async.thread-8]  c.a.s.i.c.HazelcastClusterService Received status of RUNNING for 1e9db894-35ee-4fed-84e5-7f9f375c37ce listening on /172.29.151.24:5701
      2023-08-24 12:09:45,678 DEBUG [hz.hazelcast.async.thread-8]  c.a.s.i.c.HazelcastClusterService$NodeStatusCallback Execution complete. Successful - true
      2023-08-24 12:09:45,678 DEBUG [http-nio-7990-exec-9] admin @N4RJ8Xx729x43x0 19dqndd 0:0:0:0:0:0:0:1 "GET /dashboard HTTP/1.1" c.a.s.i.c.HazelcastClusterService Node status query complete
      2023-08-24 12:09:45,818 DEBUG [http-nio-7990-exec-9] admin @N4RJ8Xx729x43x0 19dqndd 0:0:0:0:0:0:0:1 "GET /dashboard HTTP/1.1" c.a.s.i.c.HazelcastClusterService Querying all nodes for status
      2023-08-24 12:09:45,819 DEBUG [hz.hazelcast.cached.thread-1]  c.a.s.i.c.HazelcastClusterService Received query for state; returning RUNNING
      2023-08-24 12:09:45,819 DEBUG [hz.hazelcast.async.thread-9]  c.a.s.i.c.HazelcastClusterService$NodeStatusCallback Success executing on Member [172.29.151.24]:5701 - 1e9db894-35ee-4fed-84e5-7f9f375c37ce this. Result: RUNNING
      2023-08-24 12:09:45,819 DEBUG [hz.hazelcast.async.thread-9]  c.a.s.i.c.HazelcastClusterService Received status of RUNNING for 1e9db894-35ee-4fed-84e5-7f9f375c37ce listening on /172.29.151.24:5701
      2023-08-24 12:09:45,819 DEBUG [hz.hazelcast.async.thread-9]  c.a.s.i.c.HazelcastClusterService$NodeStatusCallback Execution complete. Successful - true
      2023-08-24 12:09:45,819 DEBUG [http-nio-7990-exec-9] admin @N4RJ8Xx729x43x0 19dqndd 0:0:0:0:0:0:0:1 "GET /dashboard HTTP/1.1" c.a.s.i.c.HazelcastClusterService Node status query complete
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available.

      Attachments

        Issue Links

          Activity

            People

              e31e1da5babe Randy
              spetrucev Stefan
              Votes:
              11 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: