Update git submodules

* Update plugins/replication from branch 'master'
  to 3ca941e6bc700c6f40ac45c8f3188c4c48bc8620
  - Merge branch 'stable-3.1'
    
    * stable-3.1:
      Fix firing pending "..all.." events on startup
      Do not block ref-updates during the configuration reload
    
    Change-Id: I576ce713fe266caefeb150e3b889e6b254a92725
    
  - Merge branch 'stable-3.0' into stable-3.1
    
    * stable-3.0:
      Fix firing pending "..all.." events on startup
    
    Change-Id: I38cc0318331479695af1eb34bcc8c3a45aec61aa
    
  - Merge branch 'stable-2.16' into stable-3.0
    
    * stable-2.16:
      Fix firing pending "..all.." events on startup
    
    Change-Id: I04f042199fd8935bee987b8363956115a40e0872
    
  - Fix firing pending "..all.." events on startup
    
    The Destination.wouldPushRef() method is called on startup to see if a
    Destination is configured to be pushed to for a specific ref, if it is
    not configured to do so, then firing the pending update is skipped.
    Since the magic "..all.." ref will never match the configuration in
    replication.config, always match it since if replication is configured
    at all, then it should be matched.
    
    Bug: Issue 11745
    Change-Id: I53bd527932e6aea9ddd465772925d601aa034bd3
    (cherry picked from commit 3ddf835c203565dbd415f468e0d40eac1b815c63)
    
  - Do not block ref-updates during the configuration reload
    
    For setups with a large number of remote configurations, configuration
    reload can be a time consuming operation. During the reload, the list of
    all destinations is blocked by a synchronized and thus any ref-update
    in Gerrit is blocked and cause a general outage until the replication
    plugin configuration is reloaded.
    
    This situation happens because of a ref-update post action
    GitReferenceUpdatedListener.onGitReferenceUpdated(Event). This is
    a blocking operation and it is calling another blocking method
    ReplicationQueue.fire(NameKey,String, String, ReplicationState, boolean)
    and finally synchronized method DestinationsCollection.getAll(FilterType)
    is called. If DestinationCollection is during the configuration reload
    ref-update have to wait on DestinationsCollection.getAll, this is causing
    general lock for all operations against Gerrit instance.
    
    With NoteDb, almost every operation in Gerrit causes a ref-update and,
    therefore, would be blocked in that chain, causing a unique single sync
    in the entire Gerrit JVM that can bring an entire server down.
    
    Solution to that issue is to remove synchronization on
    DestinationsCollection.getAll to stop blocking ref-updates. Removing
    synchronize keyword is still thread safe because we store destinations
    as an immutable list the only way of updating it is to replace it with
    a new list. Since it is volatile, the update of destinations is atomic
    and thread safe.
    
    Bug: Issue 12592
    Change-Id: Idcba1ef20a0ecde31e6a7ef6d827bf08746e5cb2
This commit is contained in:
David Pursehouse
2020-05-16 14:50:44 +09:00
committed by Gerrit Code Review
parent 64dfc93f22
commit 4ee9719e97