Merge branch 'stable-3.3' into stable-3.4 * stable-3.3: Allow to access source of fetch replication events Prevent misleading Invalid id' error in logs Change-Id: I3db5a83a45b0619182918a9822817b0ce487a420
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java index cad6dfb..8bf257e 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java
@@ -81,4 +81,8 @@ public String getRefName() { return ref; } + + public String getSourceNode() { + return sourceNode; + } }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java index c3d6aca..9a29c86 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java
@@ -40,4 +40,8 @@ public Project.NameKey getProjectNameKey() { return Project.nameKey(project); } + + public String getSourceNode() { + return sourceNode; + } }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java index cdba012..3ded8eb 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java
@@ -44,6 +44,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; +import org.eclipse.jgit.errors.InvalidObjectIdException; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.transport.URIish; import org.slf4j.Logger; @@ -189,7 +190,7 @@ if (revisionData.isPresent()) { return ((source) -> callSendObject(source, project, refName, revisionData.get(), state)); } - } catch (IOException | RefUpdateException e) { + } catch (InvalidObjectIdException | IOException | RefUpdateException e) { stateLog.error( String.format( "Exception during reading ref: %s, project:%s, message: %s",
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md index 126cd1b..d4c5abf 100644 --- a/src/main/resources/Documentation/config.md +++ b/src/main/resources/Documentation/config.md
@@ -181,6 +181,9 @@ By default, all other refs are included. + Note that if you are using @PLUGIN@ together with multi-site, you should + explicitly exclude `refs/multi-site/version` from being replicated. + replication.syncRefs : Specify for which refs git fetch calls should be executed synchronously. It can be provided more than once, and supports three formats: regular expressions,