summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix minor nits in documentation of replication.maxRetriesv2.13.14v2.13.13v2.13.12v2.13.11v2.13.10upstream/stable-2.13David Pursehouse2017-06-021-3/+3
| | | | Change-Id: I80e46269e12b9e7a429634dd90ce52e90cc6ad79
* Fix replication retries when maxRetries is set to 0Hugo Arès2017-05-301-1/+1
| | | | | | | maxRetries defaults to 0 which means retry indefinitely but it was not retrying. Change-Id: I6c8d8d6b1511d67b647f25193dcfe860687eea76
* Set max retries to avoid queue congestionLuca Milanesio2017-05-294-4/+45
| | | | | | | | | | | | When servers have *a lot* of remote slaves, some of them unstable and potentially offline, a maximum retry policy is needed to prevent push events to stay in the replication queue and getting rescheduled forever. Keep backward-compatible configuration by setting maxRetry by default to zero, which means disabled. Change-Id: I060cc7bc3a4d1089b0815db02d2e1430f83a2015
* ReplicationMetrics: Make members private finalv2.13.9v2.13.8v2.13.7v2.13.6David Pursehouse2017-02-021-3/+3
| | | | | | | | | | | These members should only be accessed through the public methods: - start(...), to create/start a new timer context - record(...), to record the retry/delay values Mark the members as private final to prevent unintended access. Change-Id: I69a7e3b13ba4c344f3176528306163ebef07653c
* Make SearchingChangeCacheImpl nullable when replicating from slavev2.13.5v2.13.4v2.13.3v2.13.2Makson Lee2016-10-191-1/+2
| | | | | | SearchingChangeCacheImpl should be nullable in slave mode. Change-Id: If22407565f44e7ed201e57d7d3b7b9a51f20b5bc
* Add .mailmapv2.13.1v2.13-rc1v2.13-rc0v2.13David Pursehouse2016-08-181-0/+3
| | | | Change-Id: Ic499c6b1f9f18759ef0567088b0dd693d65a0b26
* Merge branch 'stable-2.12'David Pursehouse2016-08-181-4/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.12: Destination: Consider ref visibility when scheduling replication On master the isVisibilty method was renamed to shouldReplicate and has additional logic to check for replication of hidden projects. Rename the newly added isVisibility method to shouldReplicate to be consistent. Move the hidden projects logic to a utility method and use it in both shouldReplicate methods. Change-Id: I7b713636164fd78425561a98a1f50182c9501f4a
| * Destination: Consider ref visibility when scheduling replicationv2.12.9v2.12.8v2.12.7v2.12.6v2.12.5v2.12.4upstream/stable-2.12David Pursehouse2016-08-151-1/+22
| | | | | | | | | | Bug: Issue 4398 Change-Id: I11856eabf61e734691e1b00f1c3083c017f96a01
* | Adjust to updated EventDispatcher interfaceDavid Pursehouse2016-06-224-29/+10
| | | | | | | | Change-Id: Ie3444b513988d70684f45f9155a9daae331cb898
* | Handle kill command in replication tasks also while runningJacek Centkowski2016-06-153-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue description: When replication tasks is scheduled and it gets killed with ssh kill command further replication attempts get ignored and as a result replication to particular mirror is no longer possible (Gerrit needs to be restarted or plugin reloaded). Solution: Step1: Derive PushOne from CanceledWhileRunning interface so that it gets informed that it was canceled while operation was in progress (which results in any resource operation failure). Step2: check in resource failure catch if it occurred while task was canceled. If that is the case don't reschedule. Change-Id: I4882fe1334efedf060a5ff5fef89d9d33c88d75c Signed-off-by: Jacek Centkowski <geminica.programs@gmail.com>
* | PushOne: VisibleRefFilter now requires SearchingChangeCacheImplDave Borowitz2016-06-061-4/+9
| | | | | | | | Change-Id: I19eb1e00008b9f6d979be65a75264f00bb586f02
* | Fix 'Statement unnecessarily nested within else clause' warningsDavid Pursehouse2016-06-021-6/+5
| | | | | | | | Change-Id: Ib616da2310bfc58113466fd9f0260346982b8ed3
* | Adapt to removal of CurrentUser#getStarredChanges() in coreEdwin Kempin2016-05-311-9/+0
| | | | | | | | | | Change-Id: I195cd7f0f635640762687f5b4897d57d18a0ce24 Signed-off-by: Edwin Kempin <ekempin@google.com>
* | Remove usage of deprecated Repository.getRefDavid Pursehouse2016-05-301-1/+1
| | | | | | | | Change-Id: Ie6d51453118ba6688b71f8d014e5d3945b0342dd
* | Merge branch 'stable-2.12'Hugo Arès2016-05-251-0/+6
|\| | | | | | | | | | | | | * stable-2.12: Double check if a ref is missing locally before deleting from remote Change-Id: I17606a232991b267a6828a5203f972eb5b7232a1
| * Double check if a ref is missing locally before deleting from remotev2.12.3Alexandre Philbert2016-05-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository.getRefs sometimes does not return the correct list of refs in the local repository (missing some). For this reason, we double check using Repository.getRef. Without this check, the ref is deleted from the remote by mistake. The suspicion for the former function not returning the correct list is primarily heavy garbage collection. It isn't confirmed whether the latter function always returns the correct value. Possibly a second check isn't enough, but it still catches many occurences of the issue. The presumption is that getRef is more atomic than getRefs. Change-Id: I619c92c55e36a4b6719ef812bdddb2d3b2aab814
* | Remove getNotificationFilters from RemoteSiteUserShawn Pearce2016-05-151-7/+0
| | | | | | | | | | | | Moved into a property on the IdentifiedUser. Change-Id: I524173d4bf56b908953f529cfb349b425354057e
* | Add RefReplicatedEvent refStatus testing similarly to sibling membersMarco Miller2016-05-061-0/+5
| | | | | | | | Change-Id: Ia7feb1b9983dff144d521da8c7253c66bbf6eb6b
* | Add missing opening double-quotes to event test matcher failure messagesMarco Miller2016-05-062-5/+5
| | | | | | | | Change-Id: If84853e81a4c93afaed12a60ba5f4d1a8687fa54
* | Fix event classes member access modifiers to match package-private usageMarco Miller2016-05-052-8/+8
| | | | | | | | Change-Id: Icf5aa96a53e83ff7b317af471b0d546b4ce5a917
* | Use native constructors instead of Guava to instantiate empty collectionsDavid Pursehouse2016-05-042-7/+7
| | | | | | | | | | | | | | It's not necessary to use Guava's helper methods when instantiating empty collections. Just use the native constructors. Change-Id: If301228245c9c6efe581baa6144fb72c6cc97738
* | RefReplicatedEvent: Move toStatusString to RefPushResult.toStringDavid Pursehouse2016-04-293-5/+14
| | | | | | | | Change-Id: I7ce1221744114d5bc184efb11fda27106657e6bc
* | Migrate tests to Google TruthDavid Pursehouse2016-04-292-19/+21
| | | | | | | | Change-Id: I1f0b3c8eea4cf7a96a73730fd1f87c29ec804fbf
* | ReplicationState: Improve javadoc of RefPushResult valuesDavid Pursehouse2016-04-281-2/+2
| | | | | | | | Change-Id: If602b4f836626dbeed2a76641ecdc0cdc1754f5b
* | Add new configuration option to control replication of hidden projectsDariusz Luksza2016-04-213-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases we would like to replicate hidden projects to given remotes. Right now it is not possible to achieve this, all hidden projects are not replicated. New remote.NAME.replicateHiddenProjects configuration allow to control this behavior. By default it is set to 'false' to be consistent with previous versions. Change-Id: Ie7d7330ae685e104937037a89141cef2febbf5f1 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* | Make ReplicationQueue#recursivelyDelete privateDavid Pursehouse2016-04-121-1/+1
| | | | | | | | | | | | It's only used within ReplicationQueue, so doesn't need to be public. Change-Id: I424cf4f9e7dba8d9a117be5bfd523bd5e928db31
* | DestinationConfiguration: Use ImmutableList rather than arrayDavid Pursehouse2016-04-124-32/+34
| | | | | | | | | | | | | | Use ImmutableList rather than java array to store lists of String, and refactor some usages of them to avoid creating local variables. Change-Id: I7540f7b92a50faec0cc47af52ae71e2496b8f56e
* | Remove redundant 'public' modifiersDavid Pursehouse2016-04-122-2/+2
| | | | | | | | Change-Id: If0dc4dc8ad0dc2dea4ee69c80ea63d1232c86760
* | Remove redundant modifiers from interface methodsDavid Pursehouse2016-04-121-3/+3
| | | | | | | | Change-Id: I7c046f3bdf12da3c54d1cea09d88c21b8dd91140
* | Remove redundant 'static' modifier on enumDavid Pursehouse2016-04-111-1/+1
| | | | | | | | | | | | | | enums are by default static, so do not need to be explicitly declared so. Change-Id: I3544b3f02ae82df70de02641798d5d0089969b3a
* | Add missing whitespace around keywords and bracesDavid Pursehouse2016-04-113-3/+3
| | | | | | | | Change-Id: Iec6fbe56c2c717c39411996d1f12928afeb48395
* | Extract replication configuration from Destination classDariusz Luksza2016-03-294-84/+155
| | | | | | | | | | | | | | | | This allows to change the DestinationConfiguration if someone uses replication plugin as a library or extends it. Change-Id: If46ff42e86a032701deb1607d4ed88d77f0310b9 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* | Remove usages of Throwables#propagateDave Borowitz2016-03-222-2/+4
| | | | | | | | | | | | | | Guava intends to deprecate these, and recommends the 2-line inlining of the method instead. Change-Id: I74a45915effaae2f29090f27b9b258e2c7c9a7d0
* | Merge "Remove unneeded finals from Destination class"David Ostrovsky2016-03-201-12/+12
|\ \
| * | Remove unneeded finals from Destination classHugo Arès2016-03-181-12/+12
| | | | | | | | | | | | Change-Id: I1e787f6a053283bcf0bc6f9bff3b420431be3365
* | | Remove unneeded finals from PushOne classHugo Arès2016-03-181-16/+16
|/ / | | | | | | Change-Id: Idbc958daffacdf16b449ed86e4188c7fc02117f7
* | Tidy up ReplicationFileBasedConfig constructorHugo Arès2016-03-181-6/+9
| | | | | | | | | | | | Remove finals and put one argument per line. Change-Id: If7fd869705ea4242180dd9490ef44a1e39983310
* | Tidy up AutoReloadConfigDecorator constructorHugo Arès2016-03-171-5/+8
| | | | | | | | | | | | Put one argument per line. Change-Id: I0d6114c5d443337d1c49bc402945594027a53f89
* | ListCommand: Show queue details for destinationsDavid Pursehouse2016-03-163-1/+54
| | | | | | | | | | | | | | When the --detail option is given, show the current queue (pending and in-flight) per destination. Change-Id: I0683b82f0eac4ca872946889ae5f4ccf1837e604
* | ListCommand: Remove unnecessary method parameterDavid Pursehouse2016-03-161-2/+2
| | | | | | | | | | | | | | 'detail' is a class member; it doesn't need to be passed in as a parameter. Change-Id: I8a8ab8a9f9290c81510d23b2b0e6230267c4fc20
* | ListCommand: Improve documentation and help textDavid Pursehouse2016-03-152-11/+8
| | | | | | | | Change-Id: Ic9883bf3ee820622df47ff6ff325a5acb6ca650c
* | ListCommand: Consistently capitalize json property namesDavid Pursehouse2016-03-151-1/+1
| | | | | | | | Change-Id: I6c233f205ed5d649a8283f06397f464967ddcb3d
* | ListCommand: Remove unnecessary local variableDavid Pursehouse2016-03-151-4/+1
| | | | | | | | Change-Id: I744b488492f0177db315585d4575ec606d06e1bd
* | Expose more API to enable plugin consumption as libDariusz Luksza2016-03-149-22/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to use replication plugin as a base for other replication plugins more API needs to be exposed. All classes bound in ReplicationModule are made public with package protected constructors to enable extendability. Also parts of the configuration API are exposed for supporting different configuration sources than $site_path/replication.config eg. dynamically load from 'master' server. ReplicationSshSessionFactoryProvider was added to enable consumers to configure SSH sessions by modifying credentials factory and/or set the known_hosts repository. Change-Id: I2e26fc976b04bd1ace5ddd695ef558c6d66a4716 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* | Update EventDispatcher to use DynamicItemHugo Arès2016-02-292-6/+8
| | | | | | | | | | | | This change is needed because core changed. Change-Id: Iaa6ca94fe251f367e36153760ca1c99c9a777794
* | Dispatch events using new postEvent methodHugo Arès2016-02-294-78/+23
| | | | | | | | | | | | | | | | | | The new method allow to post an event without having an instance of the original change or branch the event was created for. Basically, the new post method does what the GitUpdateProcessing.postEvent method was doing. Change-Id: I0cb88a2b4916e06a47949dc832d71654b0d26672
* | Buck: Clean up java_test ruleDavid Ostrovsky2016-02-231-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are maintaining two plugin artifacts: API and TEST_API where all needed dependencies for compilation and running tests are exposed. To make both plugin build modes work: in tree and standalone, we are maintaining two variables, that are differently defined in different build modes: in tree: GERRIT_PLUGIN_API = ['//gerrit-plugin-api:lib'] GERRIT_TESTS = ['//gerrit-acceptance-framework:lib'] standalone: GERRIT_PLUGIN_API = ['//lib/gerrit:plugin-api'] GERRIT_TESTS = ['//lib/gerrit:acceptance-framework'] Given that replication plugin is a core plugin, we don't bother to use the variables here, but use the in tree dependencies directly instead. Change-Id: If7af37426ae0a7bfd49c48fd6276d666a31fe9ac
* | Add metrics for replication delay and retriesDavid Pursehouse2016-02-232-2/+33
| | | | | | | | Change-Id: I22c55de32636bcf19f5723477c603e6450b3479b
* | Record replication latency metric in millisecondsDavid Pursehouse2016-02-231-1/+1
| | | | | | | | | | | | | | We're going to record the replication delay metric in milliseconds, so recording the latency in milliseconds makes the units consistent. Change-Id: I61df1aa283019c9824d0441636b825f103a86ab4
* | ReplicationMetrics: Add missing javadocDavid Pursehouse2016-02-231-0/+5
| | | | | | | | Change-Id: I756abe5f4eee6e3b19f39c5531f1ff09c6620a6d