1. 09 11月, 2020 3 次提交
    • H
      Revert "ic-proxy: refresh peers on demand" · 7f558913
      Hubert Zhang 提交于
      This reverts commit 9265ea6a.
      7f558913
    • N
      ic-proxy: refresh peers on demand · 9265ea6a
      Ning Yu 提交于
      The user can adjust the ic-proxy peer addresses at runtime and reload by
      sending SIGHUP, if an address is modified or removed, the corresponding
      peer connection must be closed or reestablished.  The same to the peer
      listener, if the listener port is changed, then must re-setup the
      listener.
      9265ea6a
    • N
      ic-proxy: rename ICProxyAddr.addr to sockaddr · 2c2ca626
      Ning Yu 提交于
      A ICProxyAddr variable is usually named as "addr", so the attribute is
      referred as "addr->addr", it's confusing and sometimes ambiguous.
      
      So renamed the attribute to "sockaddr", the function
      ic_proxy_extract_addr() is also renamed to ic_proxy_extract_sockaddr().
      2c2ca626
  2. 10 9月, 2020 1 次提交
    • N
      ic-proxy: support hostname as proxy addresses · 2a1794bc
      Ning Yu 提交于
      The GUC gp_interconnect_proxy_addresses is used to set the listener
      addresses and ports of all the proxy bgworkers, only IP addresses were
      supported previously, which is inconvenient to use.
      
      Now we add the support for hostnames too, the IP addresses are also
      supported.
      
      Note that if a hostname is bound to a different IP at runtime, we must
      reload the setting with the "gpstop -u" command.
      Reviewed-by: NHubert Zhang <hzhang@pivotal.io>
      2a1794bc
  3. 02 9月, 2020 2 次提交
    • H
      Fix compile error for missing brackets · b2d32cb9
      Hubert Zhang 提交于
      b2d32cb9
    • H
      Using lwlock to protect resgroup slot in session state · a4cb06b4
      Hubert Zhang 提交于
      Resource group used to access resGroupSlot in SessionState without
      lock. This is correct when session only access resGroupSlot by itself.
      But as we introduced runaway feature, we need to traverse the current
      session array to find the top consumer session when redzone is reached.
      This requires:
      1. runaway detector should hold shared resgroup lock to avoid resGroupSlot
      is detached from a session concurrently when redzone is reached.
      2. normal session should hold exclusive lock when modifying resGroupSlot
      in SessionState.
      
      Also fix a compile warning.
      Reviewed-by: NNing Yu <nyu@pivotal.io>
      a4cb06b4
  4. 01 9月, 2020 1 次提交
  5. 04 8月, 2020 1 次提交
    • N
      ic-proxy: correct SIGHUP handler · a181655b
      Ning Yu 提交于
      Fixed the bug that the SIGHUP handler was installed for SIGINT by
      mistake, so the ic-proxy bgworkers would die on SIGHUP.
      
      By correcting the signal name, now we could let the ic-proxy bgworkers
      reload the postgresql.conf by executing "gpstop -u".
      Reviewed-by: NHubert Zhang <hzhang@pivotal.io>
      a181655b
  6. 10 7月, 2020 1 次提交
    • N
      ic-proxy: implement the core logic · 6188fb1f
      Ning Yu 提交于
      The interconnect proxy mode, a.k.a. ic-proxy, is a new interconnect
      mode, all the backends communicate via a proxy bgworker, all the
      backends on the same segment share the same proxy bgworker, so every two
      segments only need one network connection between them, which reduces
      the network flows as well the ports.
      
      To enable the proxy mode we need to first configure the guc
      gp_interconnect_proxy_addresses, for example:
      
          gpconfig \
            -c gp_interconnect_proxy_addresses \
            -v "'1:-1:10.0.0.1:2000,2:0:10.0.0.2:2001,3:1:10.0.0.3:2002'" \
            --skipvalidation
      
      Then restart to take effect.
      6188fb1f