got error when replicated from slave

52 views
Skip to first unread message

Makson Lee

unread,
Oct 18, 2016, 10:26:10 PM10/18/16
to Repo and Gerrit Discussion
gerrit version is 2.13.1, got the following error when replicated from salve to build machine, if we turn the salve mode off, problem gone.


[2016-10-19 10:07:56,263] [] scheduling replication All-Projects:..all.. => git://build-machine:9418/All-Projects.git
[2016-10-19 10:07:56,362] [] Cannot enumerate known projects
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) null returned by binding at com.google.gerrit.server.plugins.PluginGuiceEnvironment$2.configure(PluginGuiceEnvironment.java:561) (via modules: com.google.gerrit.server.plugins.PluginGuiceEnvironment$1 -> com.google.gerrit.server.plugins.PluginGuiceEnvironment$2)
 but the 9th parameter of com.googlesource.gerrit.plugins.replication.PushOne.<init>(PushOne.java:137) is not @Nullable
  while locating com.google.gerrit.server.git.SearchingChangeCacheImpl
    for the 9th parameter of com.googlesource.gerrit.plugins.replication.PushOne.<init>(PushOne.java:137)
  while locating com.googlesource.gerrit.plugins.replication.PushOne annotated with @com.google.inject.internal.UniqueAnnotations$Internal(value=9)

1 error
        at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1028)
        at com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:776)
        at com.googlesource.gerrit.plugins.replication.$Proxy162.create(Unknown Source)
        at com.googlesource.gerrit.plugins.replication.Destination.schedule(Destination.java:284)
        at com.googlesource.gerrit.plugins.replication.ReplicationQueue.scheduleFullSync(ReplicationQueue.java:126)
        at com.googlesource.gerrit.plugins.replication.PushAll.run(PushAll.java:69)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:407)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Makson Lee

unread,
Oct 18, 2016, 11:04:28 PM10/18/16
to Repo and Gerrit Discussion
SearchingChangeCacheImpl should be nullable when in slave mode, right?

gerrit/plugins/replication/v2.13.1/./src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java

 @Inject
  PushOne(GitRepositoryManager grm,
      SchemaFactory<ReviewDb> s,
      Destination p,
      RemoteConfig c,
      CredentialsFactory cpFactory,
      TagCache tc,
      PerThreadRequestScope.Scoper ts,
      ChangeNotes.Factory nf,
      SearchingChangeCacheImpl cc,
      ReplicationQueue rq,
      IdGenerator ig,
      ReplicationStateListener sl,
      ReplicationMetrics m,
      @Assisted Project.NameKey d,
      @Assisted URIish u) {

Makson Lee

unread,
Oct 19, 2016, 12:29:45 AM10/19/16
to Repo and Gerrit Discussion
fixed the problem by making SearchingChangeCacheImpl nullable.

--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -21,6 +21,7 @@ import com.google.common.base.Throwables;
 import com.google.common.collect.LinkedListMultimap;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Sets;
+import com.google.gerrit.common.Nullable;
 import com.google.gerrit.extensions.events.GitReferenceUpdatedListener;
 import com.google.gerrit.metrics.Timer1;
 import com.google.gerrit.reviewdb.client.Project;
@@ -128,7 +129,7 @@ class PushOne implements ProjectRunnable, CanceledWhileRunning {
       TagCache tc,
       PerThreadRequestScope.Scoper ts,
       ChangeNotes.Factory nf,
-      SearchingChangeCacheImpl cc,
+      @Nullable SearchingChangeCacheImpl cc,
       ReplicationQueue rq,
       IdGenerator ig,
       ReplicationStateListener sl,
--

David Pursehouse

unread,
Oct 19, 2016, 1:32:21 AM10/19/16
to Makson Lee, Repo and Gerrit Discussion
On Wed, Oct 19, 2016 at 1:29 PM Makson Lee <cdle...@gmail.com> wrote:
fixed the problem by making SearchingChangeCacheImpl nullable.


Will you push this for review at gerrit-review.googlesource.com?

 
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Makson Lee

unread,
Oct 19, 2016, 1:44:31 AM10/19/16
to Repo and Gerrit Discussion, cdle...@gmail.com


On Wednesday, October 19, 2016 at 1:32:21 PM UTC+8, David Pursehouse wrote:
On Wed, Oct 19, 2016 at 1:29 PM Makson Lee <cdle...@gmail.com> wrote:
fixed the problem by making SearchingChangeCacheImpl nullable.


Will you push this for review at gerrit-review.googlesource.com?

David Pursehouse

unread,
Oct 19, 2016, 2:08:12 AM10/19/16
to Makson Lee, Repo and Gerrit Discussion
Thanks.  I've created a stable-2.13 branch on the replication plugin and moved your change there.

Makson Lee

unread,
Oct 19, 2016, 2:25:06 AM10/19/16
to Repo and Gerrit Discussion, cdle...@gmail.com
On Wednesday, October 19, 2016 at 2:08:12 PM UTC+8, David Pursehouse wrote:
Thanks.  I've created a stable-2.13 branch on the replication plugin and moved your change there.

great, i was just thinking why no 2.13 branch was there. 
Reply all
Reply to author
Forward
0 new messages