Gerrit 2.14: notedb causing a lot of parsePackedRefs calls although notedb.changes.read/write is false

40 views
Skip to first unread message

Saša Živkov

unread,
Nov 5, 2018, 6:32:09 AM11/5/18
to repo-d...@googlegroups.com
From our thread dumps I observe that a lot of stack traces contain this fragment [1].
Since, by default, notedb.changes.read and notedb.chagnes.write is false (and we didn't set any of these options to true)
I wonder if these calls from notedb.* package to JGit are justified?

[1]
        at org.eclipse.jgit.internal.storage.file.RefDirectory.parsePackedRefs(Ljava/io/BufferedReader;)Lorg/eclipse/jgit/util/RefList;(RefDirectory.java:837)
        at org.eclipse.jgit.internal.storage.file.RefDirectory.readPackedRefs()Lorg/eclipse/jgit/internal/storage/file/RefDirectory$PackedRefList;(RefDirectory.java:809)
        at org.eclipse.jgit.internal.storage.file.RefDirectory.getPackedRefs()Lorg/eclipse/jgit/internal/storage/file/RefDirectory$PackedRefList;(RefDirectory.java:782)
        at org.eclipse.jgit.internal.storage.file.RefDirectory.exactRef(Ljava/lang/String;)Lorg/eclipse/jgit/lib/Ref;(RefDirectory.java:271)
        at com.google.gerrit.server.notedb.AbstractChangeNotes.readRef(Lorg/eclipse/jgit/lib/Repository;)Lorg/eclipse/jgit/lib/ObjectId;(AbstractChangeNotes.java:173)
        at com.google.gerrit.server.notedb.ChangeNotes.readRef(Lorg/eclipse/jgit/lib/Repository;)Lorg/eclipse/jgit/lib/ObjectId;(ChangeNotes.java:595)
        at com.google.gerrit.server.notedb.ChangeNotes.openHandle(Lorg/eclipse/jgit/lib/Repository;)Lcom/google/gerrit/server/notedb/AbstractChangeNotes$LoadHandle;(ChangeNotes.java:602)
        at com.google.gerrit.server.notedb.AbstractChangeNotes.load()Ljava/lang/Object;(AbstractChangeNotes.java:158)
        at com.google.gerrit.server.notedb.ChangeNotes$Factory.create(Lcom/google/gerrit/reviewdb/server/ReviewDb;Lcom/google/gerrit/reviewdb/client/Project$NameKey;Lcom/google/gerrit/reviewdb/client/Change$
        at com.google.gerrit.server.project.ChangeControl$Factory.create(Lcom/google/gerrit/server/project/RefControl;Lcom/google/gerrit/reviewdb/server/ReviewDb;Lcom/google/gerrit/reviewdb/client/Project$Na

Edwin Kempin

unread,
Nov 5, 2018, 7:39:35 AM11/5/18
to Saša Živkov, repo-d...@googlegroups.com
On Mon, Nov 5, 2018 at 12:32 PM Saša Živkov <ziv...@gmail.com> wrote:
From our thread dumps I observe that a lot of stack traces contain this fragment [1].
Which exact Gerrit version are you running (asking to match line numbers from the stacktrace)?

 
Since, by default, notedb.changes.read and notedb.chagnes.write is false (and we didn't set any of these options to true)
I wonder if these calls from notedb.* package to JGit are justified?

[1]
        at org.eclipse.jgit.internal.storage.file.RefDirectory.parsePackedRefs(Ljava/io/BufferedReader;)Lorg/eclipse/jgit/util/RefList;(RefDirectory.java:837)
        at org.eclipse.jgit.internal.storage.file.RefDirectory.readPackedRefs()Lorg/eclipse/jgit/internal/storage/file/RefDirectory$PackedRefList;(RefDirectory.java:809)
        at org.eclipse.jgit.internal.storage.file.RefDirectory.getPackedRefs()Lorg/eclipse/jgit/internal/storage/file/RefDirectory$PackedRefList;(RefDirectory.java:782)
        at org.eclipse.jgit.internal.storage.file.RefDirectory.exactRef(Ljava/lang/String;)Lorg/eclipse/jgit/lib/Ref;(RefDirectory.java:271)
        at com.google.gerrit.server.notedb.AbstractChangeNotes.readRef(Lorg/eclipse/jgit/lib/Repository;)Lorg/eclipse/jgit/lib/ObjectId;(AbstractChangeNotes.java:173)
        at com.google.gerrit.server.notedb.ChangeNotes.readRef(Lorg/eclipse/jgit/lib/Repository;)Lorg/eclipse/jgit/lib/ObjectId;(ChangeNotes.java:595)
        at com.google.gerrit.server.notedb.ChangeNotes.openHandle(Lorg/eclipse/jgit/lib/Repository;)Lcom/google/gerrit/server/notedb/AbstractChangeNotes$LoadHandle;(ChangeNotes.java:602)
        at com.google.gerrit.server.notedb.AbstractChangeNotes.load()Ljava/lang/Object;(AbstractChangeNotes.java:158)
The comment at this line shows that it's NOT intended to open the repository in this case: 

 
        at com.google.gerrit.server.notedb.ChangeNotes$Factory.create(Lcom/google/gerrit/reviewdb/server/ReviewDb;Lcom/google/gerrit/reviewdb/client/Project$NameKey;Lcom/google/gerrit/reviewdb/client/Change$
        at com.google.gerrit.server.project.ChangeControl$Factory.create(Lcom/google/gerrit/server/project/RefControl;Lcom/google/gerrit/reviewdb/server/ReviewDb;Lcom/google/gerrit/reviewdb/client/Project$Na

--
--
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.

Saša Živkov

unread,
Nov 5, 2018, 7:39:44 AM11/5/18
to repo-d...@googlegroups.com


On Mon, Nov 5, 2018 at 12:31 PM Saša Živkov <ziv...@gmail.com> wrote:
From our thread dumps I observe that a lot of stack traces contain this fragment [1].
Since, by default, notedb.changes.read and notedb.chagnes.write is false (and we didn't set any of these options to true)
I wonder if these calls from notedb.* package to JGit are justified?

[1]
        at org.eclipse.jgit.internal.storage.file.RefDirectory.parsePackedRefs(Ljava/io/BufferedReader;)Lorg/eclipse/jgit/util/RefList;(RefDirectory.java:837)

From JGit's source code we see that this will only happen if core.trustFolderStat is set to false, which was our case.
This means, that mostly Gerrit servers running on NFS could be affected, as this option is only used for NFS.

Edwin Kempin

unread,
Nov 5, 2018, 7:49:41 AM11/5/18
to Saša Živkov, repo-d...@googlegroups.com
On Mon, Nov 5, 2018 at 1:38 PM Edwin Kempin <eke...@google.com> wrote:


On Mon, Nov 5, 2018 at 12:32 PM Saša Živkov <ziv...@gmail.com> wrote:
From our thread dumps I observe that a lot of stack traces contain this fragment [1].
Which exact Gerrit version are you running (asking to match line numbers from the stacktrace)?

Saša Živkov

unread,
Nov 5, 2018, 8:11:03 AM11/5/18
to Edwin Kempin, repo-d...@googlegroups.com
On Mon, Nov 5, 2018 at 1:49 PM Edwin Kempin <eke...@google.com> wrote:


On Mon, Nov 5, 2018 at 1:38 PM Edwin Kempin <eke...@google.com> wrote:


On Mon, Nov 5, 2018 at 12:32 PM Saša Živkov <ziv...@gmail.com> wrote:
From our thread dumps I observe that a lot of stack traces contain this fragment [1].
Which exact Gerrit version are you running (asking to match line numbers from the stacktrace)?
Ah, the subject says 2.14.

Yes, 2.14.14.
There doesn't seem to be any explicit configuration for this option?
However, at this place [1] autoRebuild is hardcoded to true.
Looks like a bug?

Edwin Kempin

unread,
Nov 5, 2018, 8:11:57 AM11/5/18
to Saša Živkov, repo-d...@googlegroups.com

Saša Živkov

unread,
Nov 5, 2018, 8:24:18 AM11/5/18
to Edwin Kempin, repo-d...@googlegroups.com
On Mon, Nov 5, 2018 at 2:11 PM Edwin Kempin <eke...@google.com> wrote:

Yes this is the fix we also need in 2.14.
Cherry-picked here [1]

Reply all
Reply to author
Forward
0 new messages