Recovering a deleted review from our build automation's reference repo?

123 views
Skip to first unread message

euph...@gmail.com

unread,
Feb 25, 2021, 4:35:45 AM2/25/21
to Repo and Gerrit Discussion
We have some large git repositories, so we use reference repos in our build automation to improve build times and mitigate impact on our network.  So when a change is pushed in for review on a repository, there's a reference repo on one of our build systems in which we run a "git remote update", then the build clones into an empty directory using the --reference option (and a build and test starts running, that gets scored on the verified label for that review).

After someone deleted a review on our Gerrit server, they realized too late that they wanted another look at the review comments.  I went looking at the build system that had recently run a build of the latest patchset for that review, and I saw that I still had the metadata and all three patchsets in refs/changes in that build system's reference repo (though those are now gone on our Gerrit server).  We're using Gerrit 3.1.4, so we're on notedb.  Looking in refs/changes in the build system's reference repo for the review, I see this:

56ae210343274afcf2966b45c18ba5634c221d11 refs/changes/05/73905/1
624995b5ecb24618f44dbac85dae54d8c167407f refs/changes/05/73905/2
4ab21664360721af45d68b7e983a8c913f374361 refs/changes/05/73905/3
5cee36b36e5e6defa7739233834dfd2df7ff02c3 refs/changes/05/73905/meta

I sent the user who wanted the comments a "git log -p" of the meta commit, but it got me thinking -- Could I restore that review on our Gerrit server by pushing its data back in from this reference repo?  How exactly could I do that?  I'm guessing the push command would look a bit unusual, and I may have to give myself additional permissions to let it go through.  Will Gerrit even allow me to push something directly to refs/changes without going through refs/for?  I made a copy of that reference repo, added my gerrit test environment as a remote (I am not trying this with our production Gerrit server), after several iterations I gave myself create, push, forge author, and forge committer permissions on refs/changes/* in the relevant repo, turned off our jira integration, turned off the requirement to have a change-id in the commit message, and eventually got stuck at this:

$ git push -o notedb=allow gerrit-test refs/changes/05/73905/*:refs/changes/05/73905/*
Enumerating objects: 8463, done.
Counting objects: 100% (5139/5139), done.
Delta compression using up to 16 threads
Compressing objects: 100% (2541/2541), done.
Writing objects: 100% (3890/3890), 812.61 KiB | 5.42 MiB/s, done.
Total 3890 (delta 1403), reused 1191 (delta 310), pack-reused 0
remote: Resolving deltas: 100% (1403/1403)
remote: Processing changes: refs: 4, done    
remote: error: internal error
remote: commit 56ae210: warning: subject >50 characters; use shorter first paragraph
remote: commit eb60883: warning: subject >50 characters; use shorter first paragraph
remote: commit 9489474: warning: subject >50 characters; use shorter first paragraph
remote: commit 88d0e4f: warning: subject >50 characters; use shorter first paragraph
remote: commit 88d0e4f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 96f6f4d: warning: subject >50 characters; use shorter first paragraph
remote: commit fe48ee3: warning: subject >50 characters; use shorter first paragraph
remote: commit fe48ee3: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d90b4f2: warning: subject >50 characters; use shorter first paragraph
remote: commit d90b4f2: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit deeaa4d: warning: subject >50 characters; use shorter first paragraph
remote: commit deeaa4d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit bb6e3d1: warning: subject >50 characters; use shorter first paragraph
remote: commit bb6e3d1: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit ba110cf: warning: subject >50 characters; use shorter first paragraph
remote: commit f4152c1: warning: subject >50 characters; use shorter first paragraph
remote: commit c4790fd: warning: subject >50 characters; use shorter first paragraph
remote: commit 7fd1c59: warning: subject >50 characters; use shorter first paragraph
remote: commit 7fd1c59: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 6ea6983: warning: subject >50 characters; use shorter first paragraph
remote: commit 7ad46a2: warning: subject >50 characters; use shorter first paragraph
remote: commit 43c968f: warning: subject >50 characters; use shorter first paragraph
remote: commit 1213fda: warning: subject >50 characters; use shorter first paragraph
remote: commit 4ec6c2c: warning: subject >50 characters; use shorter first paragraph
remote: commit 4ec6c2c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit f031ffa: warning: subject >50 characters; use shorter first paragraph
remote: commit 7c7a44c: warning: subject >50 characters; use shorter first paragraph
remote: commit 7c7a44c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 3efb2ab: warning: subject >50 characters; use shorter first paragraph
remote: commit bf954aa: warning: subject >50 characters; use shorter first paragraph
remote: commit 37c7cd7: warning: subject >50 characters; use shorter first paragraph
remote: commit 37c7cd7: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit eb6e157: warning: subject >50 characters; use shorter first paragraph
remote: commit 0319d84: warning: subject >50 characters; use shorter first paragraph
remote: commit b41ab6e: warning: subject >50 characters; use shorter first paragraph
remote: commit 21a5cd1: warning: subject >50 characters; use shorter first paragraph
remote: commit ff7887e: warning: subject >50 characters; use shorter first paragraph
remote: commit ff7887e: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 09c1ce6: warning: subject >50 characters; use shorter first paragraph
remote: commit 09c1ce6: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit e1987af: warning: subject >50 characters; use shorter first paragraph
remote: commit 829e2d4: warning: subject >50 characters; use shorter first paragraph
remote: commit 5923408: warning: subject >50 characters; use shorter first paragraph
remote: commit da9f610: warning: subject >50 characters; use shorter first paragraph
remote: commit 46bc2fc: warning: subject >50 characters; use shorter first paragraph
remote: commit 46bc2fc: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 96bb24a: warning: subject >50 characters; use shorter first paragraph
remote: commit 420e402: warning: subject >50 characters; use shorter first paragraph
remote: commit d0c2240: warning: subject >50 characters; use shorter first paragraph
remote: commit c43bff3: warning: subject >50 characters; use shorter first paragraph
remote: commit c43bff3: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit b865545: warning: subject >50 characters; use shorter first paragraph
remote: commit b865545: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d8d2127: warning: subject >50 characters; use shorter first paragraph
remote: commit d8d2127: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit eb62684: warning: subject >50 characters; use shorter first paragraph
remote: commit eb62684: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 262adac: warning: subject >50 characters; use shorter first paragraph
remote: commit e9c7a5b: warning: subject >50 characters; use shorter first paragraph
remote: commit e9c7a5b: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit aaf808d: warning: subject >50 characters; use shorter first paragraph
remote: commit aaf808d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 4eb48f3: warning: subject >50 characters; use shorter first paragraph
remote: commit b651a39: warning: subject >50 characters; use shorter first paragraph
remote: commit b651a39: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 823758f: warning: subject >50 characters; use shorter first paragraph
remote: commit 2187e8f: warning: subject >50 characters; use shorter first paragraph
remote: commit 2187e8f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit a6f0688: warning: subject >50 characters; use shorter first paragraph
remote: commit a6f0688: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 93451d6: warning: subject >50 characters; use shorter first paragraph
remote: commit 93451d6: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 67ff163: warning: subject >50 characters; use shorter first paragraph
remote: commit e3e05ae: warning: subject >50 characters; use shorter first paragraph
remote: commit e3e05ae: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit fd8dcc2: warning: subject >50 characters; use shorter first paragraph
remote: commit bce2795: warning: subject >50 characters; use shorter first paragraph
remote: commit bce2795: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 0c64f16: warning: subject >50 characters; use shorter first paragraph
remote: commit 0c64f16: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 9659625: warning: subject >50 characters; use shorter first paragraph
remote: commit 9659625: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 1eae190: warning: subject >50 characters; use shorter first paragraph
remote: commit fd745f9: warning: subject >50 characters; use shorter first paragraph
remote: commit fd745f9: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit fdc5b0d: warning: subject >50 characters; use shorter first paragraph
remote: commit fdc5b0d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d131d0a: warning: subject >50 characters; use shorter first paragraph
remote: commit 87af7e8: warning: subject >50 characters; use shorter first paragraph
remote: commit a3e2f9b: warning: subject >50 characters; use shorter first paragraph
remote: commit dcc940d: warning: subject >50 characters; use shorter first paragraph
remote: commit c9846db: warning: subject >50 characters; use shorter first paragraph
remote: commit ec9b2c7: warning: subject >50 characters; use shorter first paragraph
remote: commit bddcb10: warning: subject >50 characters; use shorter first paragraph
remote: commit bddcb10: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 775d2bf: warning: subject >50 characters; use shorter first paragraph
remote: commit 775d2bf: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 1a85a21: warning: subject >50 characters; use shorter first paragraph
remote: commit ab7c135: warning: subject >50 characters; use shorter first paragraph
remote: commit ab7c135: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 2a81961: warning: subject >50 characters; use shorter first paragraph
remote: commit fdb1e2c: warning: subject >50 characters; use shorter first paragraph
remote: commit fdb1e2c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit b13ed67: warning: subject >50 characters; use shorter first paragraph
remote: commit 0b47044: warning: subject >50 characters; use shorter first paragraph
remote: commit aad692c: warning: subject >50 characters; use shorter first paragraph
remote: commit 2db1efa: warning: subject >50 characters; use shorter first paragraph
remote: commit 8b39d9f: warning: subject >50 characters; use shorter first paragraph
remote: commit 8b39d9f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit f23bd7e: warning: subject >50 characters; use shorter first paragraph
remote: commit 76028eb: warning: subject >50 characters; use shorter first paragraph
remote: commit ef8cf09: warning: subject >50 characters; use shorter first paragraph
remote: commit ee79ea0: warning: subject >50 characters; use shorter first paragraph
remote: commit ab0e194: warning: subject >50 characters; use shorter first paragraph
remote: commit fc2310a: warning: subject >50 characters; use shorter first paragraph
remote: commit 6e0be76: warning: subject >50 characters; use shorter first paragraph
remote: commit bd02281: warning: subject >50 characters; use shorter first paragraph
remote: commit bd02281: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 9b5ea4c: warning: subject >50 characters; use shorter first paragraph
remote: commit bb0fdda: warning: subject >50 characters; use shorter first paragraph
remote: commit 0c18c14: warning: subject >50 characters; use shorter first paragraph
remote: commit b8eb448: warning: subject >50 characters; use shorter first paragraph
remote: commit c7ab9dc: warning: subject >50 characters; use shorter first paragraph
remote: commit c7ab9dc: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit c27fa92: warning: subject >50 characters; use shorter first paragraph
remote: commit 5228049: warning: subject >50 characters; use shorter first paragraph
remote: commit 5228049: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 92199d5: warning: subject >50 characters; use shorter first paragraph
remote: commit 92199d5: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 624995b: warning: subject >50 characters; use shorter first paragraph
remote: commit eb60883: warning: subject >50 characters; use shorter first paragraph
remote: commit 9489474: warning: subject >50 characters; use shorter first paragraph
remote: commit 88d0e4f: warning: subject >50 characters; use shorter first paragraph
remote: commit 88d0e4f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 96f6f4d: warning: subject >50 characters; use shorter first paragraph
remote: commit fe48ee3: warning: subject >50 characters; use shorter first paragraph
remote: commit fe48ee3: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d90b4f2: warning: subject >50 characters; use shorter first paragraph
remote: commit d90b4f2: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit deeaa4d: warning: subject >50 characters; use shorter first paragraph
remote: commit deeaa4d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit bb6e3d1: warning: subject >50 characters; use shorter first paragraph
remote: commit bb6e3d1: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit ba110cf: warning: subject >50 characters; use shorter first paragraph
remote: commit f4152c1: warning: subject >50 characters; use shorter first paragraph
remote: commit c4790fd: warning: subject >50 characters; use shorter first paragraph
remote: commit 7fd1c59: warning: subject >50 characters; use shorter first paragraph
remote: commit 7fd1c59: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 6ea6983: warning: subject >50 characters; use shorter first paragraph
remote: commit 7ad46a2: warning: subject >50 characters; use shorter first paragraph
remote: commit 43c968f: warning: subject >50 characters; use shorter first paragraph
remote: commit 1213fda: warning: subject >50 characters; use shorter first paragraph
remote: commit 4ec6c2c: warning: subject >50 characters; use shorter first paragraph
remote: commit 4ec6c2c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit f031ffa: warning: subject >50 characters; use shorter first paragraph
remote: commit 7c7a44c: warning: subject >50 characters; use shorter first paragraph
remote: commit 7c7a44c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 3efb2ab: warning: subject >50 characters; use shorter first paragraph
remote: commit bf954aa: warning: subject >50 characters; use shorter first paragraph
remote: commit 37c7cd7: warning: subject >50 characters; use shorter first paragraph
remote: commit 37c7cd7: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit eb6e157: warning: subject >50 characters; use shorter first paragraph
remote: commit 0319d84: warning: subject >50 characters; use shorter first paragraph
remote: commit b41ab6e: warning: subject >50 characters; use shorter first paragraph
remote: commit 21a5cd1: warning: subject >50 characters; use shorter first paragraph
remote: commit ff7887e: warning: subject >50 characters; use shorter first paragraph
remote: commit ff7887e: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 09c1ce6: warning: subject >50 characters; use shorter first paragraph
remote: commit 09c1ce6: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit e1987af: warning: subject >50 characters; use shorter first paragraph
remote: commit 829e2d4: warning: subject >50 characters; use shorter first paragraph
remote: commit 5923408: warning: subject >50 characters; use shorter first paragraph
remote: commit da9f610: warning: subject >50 characters; use shorter first paragraph
remote: commit 46bc2fc: warning: subject >50 characters; use shorter first paragraph
remote: commit 46bc2fc: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 96bb24a: warning: subject >50 characters; use shorter first paragraph
remote: commit 420e402: warning: subject >50 characters; use shorter first paragraph
remote: commit d0c2240: warning: subject >50 characters; use shorter first paragraph
remote: commit c43bff3: warning: subject >50 characters; use shorter first paragraph
remote: commit c43bff3: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit b865545: warning: subject >50 characters; use shorter first paragraph
remote: commit b865545: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d8d2127: warning: subject >50 characters; use shorter first paragraph
remote: commit d8d2127: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit eb62684: warning: subject >50 characters; use shorter first paragraph
remote: commit eb62684: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 262adac: warning: subject >50 characters; use shorter first paragraph
remote: commit e9c7a5b: warning: subject >50 characters; use shorter first paragraph
remote: commit e9c7a5b: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit aaf808d: warning: subject >50 characters; use shorter first paragraph
remote: commit aaf808d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 4eb48f3: warning: subject >50 characters; use shorter first paragraph
remote: commit b651a39: warning: subject >50 characters; use shorter first paragraph
remote: commit b651a39: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 823758f: warning: subject >50 characters; use shorter first paragraph
remote: commit 2187e8f: warning: subject >50 characters; use shorter first paragraph
remote: commit 2187e8f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit a6f0688: warning: subject >50 characters; use shorter first paragraph
remote: commit a6f0688: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 93451d6: warning: subject >50 characters; use shorter first paragraph
remote: commit 93451d6: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 67ff163: warning: subject >50 characters; use shorter first paragraph
remote: commit e3e05ae: warning: subject >50 characters; use shorter first paragraph
remote: commit e3e05ae: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit fd8dcc2: warning: subject >50 characters; use shorter first paragraph
remote: commit bce2795: warning: subject >50 characters; use shorter first paragraph
remote: commit bce2795: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 0c64f16: warning: subject >50 characters; use shorter first paragraph
remote: commit 0c64f16: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 9659625: warning: subject >50 characters; use shorter first paragraph
remote: commit 9659625: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 1eae190: warning: subject >50 characters; use shorter first paragraph
remote: commit fd745f9: warning: subject >50 characters; use shorter first paragraph
remote: commit fd745f9: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit fdc5b0d: warning: subject >50 characters; use shorter first paragraph
remote: commit fdc5b0d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d131d0a: warning: subject >50 characters; use shorter first paragraph
remote: commit 87af7e8: warning: subject >50 characters; use shorter first paragraph
remote: commit a3e2f9b: warning: subject >50 characters; use shorter first paragraph
remote: commit dcc940d: warning: subject >50 characters; use shorter first paragraph
remote: commit c9846db: warning: subject >50 characters; use shorter first paragraph
remote: commit ec9b2c7: warning: subject >50 characters; use shorter first paragraph
remote: commit bddcb10: warning: subject >50 characters; use shorter first paragraph
remote: commit bddcb10: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 775d2bf: warning: subject >50 characters; use shorter first paragraph
remote: commit 775d2bf: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 1a85a21: warning: subject >50 characters; use shorter first paragraph
remote: commit ab7c135: warning: subject >50 characters; use shorter first paragraph
remote: commit ab7c135: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 2a81961: warning: subject >50 characters; use shorter first paragraph
remote: commit fdb1e2c: warning: subject >50 characters; use shorter first paragraph
remote: commit fdb1e2c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit b13ed67: warning: subject >50 characters; use shorter first paragraph
remote: commit 0b47044: warning: subject >50 characters; use shorter first paragraph
remote: commit aad692c: warning: subject >50 characters; use shorter first paragraph
remote: commit 2db1efa: warning: subject >50 characters; use shorter first paragraph
remote: commit 8b39d9f: warning: subject >50 characters; use shorter first paragraph
remote: commit 8b39d9f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit f23bd7e: warning: subject >50 characters; use shorter first paragraph
remote: commit 76028eb: warning: subject >50 characters; use shorter first paragraph
remote: commit ef8cf09: warning: subject >50 characters; use shorter first paragraph
remote: commit ee79ea0: warning: subject >50 characters; use shorter first paragraph
remote: commit ab0e194: warning: subject >50 characters; use shorter first paragraph
remote: commit fc2310a: warning: subject >50 characters; use shorter first paragraph
remote: commit 6e0be76: warning: subject >50 characters; use shorter first paragraph
remote: commit bd02281: warning: subject >50 characters; use shorter first paragraph
remote: commit bd02281: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 9b5ea4c: warning: subject >50 characters; use shorter first paragraph
remote: commit bb0fdda: warning: subject >50 characters; use shorter first paragraph
remote: commit 0c18c14: warning: subject >50 characters; use shorter first paragraph
remote: commit b8eb448: warning: subject >50 characters; use shorter first paragraph
remote: commit c7ab9dc: warning: subject >50 characters; use shorter first paragraph
remote: commit c7ab9dc: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit c27fa92: warning: subject >50 characters; use shorter first paragraph
remote: commit 5228049: warning: subject >50 characters; use shorter first paragraph
remote: commit 5228049: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 92199d5: warning: subject >50 characters; use shorter first paragraph
remote: commit 92199d5: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 4ab2166: warning: subject >50 characters; use shorter first paragraph
remote: commit eb60883: warning: subject >50 characters; use shorter first paragraph
remote: commit 9489474: warning: subject >50 characters; use shorter first paragraph
remote: commit 88d0e4f: warning: subject >50 characters; use shorter first paragraph
remote: commit 88d0e4f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 96f6f4d: warning: subject >50 characters; use shorter first paragraph
remote: commit fe48ee3: warning: subject >50 characters; use shorter first paragraph
remote: commit fe48ee3: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d90b4f2: warning: subject >50 characters; use shorter first paragraph
remote: commit d90b4f2: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit deeaa4d: warning: subject >50 characters; use shorter first paragraph
remote: commit deeaa4d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit bb6e3d1: warning: subject >50 characters; use shorter first paragraph
remote: commit bb6e3d1: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit ba110cf: warning: subject >50 characters; use shorter first paragraph
remote: commit f4152c1: warning: subject >50 characters; use shorter first paragraph
remote: commit c4790fd: warning: subject >50 characters; use shorter first paragraph
remote: commit 7fd1c59: warning: subject >50 characters; use shorter first paragraph
remote: commit 7fd1c59: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 6ea6983: warning: subject >50 characters; use shorter first paragraph
remote: commit 7ad46a2: warning: subject >50 characters; use shorter first paragraph
remote: commit 43c968f: warning: subject >50 characters; use shorter first paragraph
remote: commit 1213fda: warning: subject >50 characters; use shorter first paragraph
remote: commit 4ec6c2c: warning: subject >50 characters; use shorter first paragraph
remote: commit 4ec6c2c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit f031ffa: warning: subject >50 characters; use shorter first paragraph
remote: commit 7c7a44c: warning: subject >50 characters; use shorter first paragraph
remote: commit 7c7a44c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 3efb2ab: warning: subject >50 characters; use shorter first paragraph
remote: commit bf954aa: warning: subject >50 characters; use shorter first paragraph
remote: commit 37c7cd7: warning: subject >50 characters; use shorter first paragraph
remote: commit 37c7cd7: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit eb6e157: warning: subject >50 characters; use shorter first paragraph
remote: commit 0319d84: warning: subject >50 characters; use shorter first paragraph
remote: commit b41ab6e: warning: subject >50 characters; use shorter first paragraph
remote: commit 21a5cd1: warning: subject >50 characters; use shorter first paragraph
remote: commit ff7887e: warning: subject >50 characters; use shorter first paragraph
remote: commit ff7887e: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 09c1ce6: warning: subject >50 characters; use shorter first paragraph
remote: commit 09c1ce6: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit e1987af: warning: subject >50 characters; use shorter first paragraph
remote: commit 829e2d4: warning: subject >50 characters; use shorter first paragraph
remote: commit 5923408: warning: subject >50 characters; use shorter first paragraph
remote: commit da9f610: warning: subject >50 characters; use shorter first paragraph
remote: commit 46bc2fc: warning: subject >50 characters; use shorter first paragraph
remote: commit 46bc2fc: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 96bb24a: warning: subject >50 characters; use shorter first paragraph
remote: commit 420e402: warning: subject >50 characters; use shorter first paragraph
remote: commit d0c2240: warning: subject >50 characters; use shorter first paragraph
remote: commit c43bff3: warning: subject >50 characters; use shorter first paragraph
remote: commit c43bff3: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit b865545: warning: subject >50 characters; use shorter first paragraph
remote: commit b865545: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d8d2127: warning: subject >50 characters; use shorter first paragraph
remote: commit d8d2127: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit eb62684: warning: subject >50 characters; use shorter first paragraph
remote: commit eb62684: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 262adac: warning: subject >50 characters; use shorter first paragraph
remote: commit e9c7a5b: warning: subject >50 characters; use shorter first paragraph
remote: commit e9c7a5b: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit aaf808d: warning: subject >50 characters; use shorter first paragraph
remote: commit aaf808d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 4eb48f3: warning: subject >50 characters; use shorter first paragraph
remote: commit b651a39: warning: subject >50 characters; use shorter first paragraph
remote: commit b651a39: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 823758f: warning: subject >50 characters; use shorter first paragraph
remote: commit 2187e8f: warning: subject >50 characters; use shorter first paragraph
remote: commit 2187e8f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit a6f0688: warning: subject >50 characters; use shorter first paragraph
remote: commit a6f0688: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 93451d6: warning: subject >50 characters; use shorter first paragraph
remote: commit 93451d6: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 67ff163: warning: subject >50 characters; use shorter first paragraph
remote: commit e3e05ae: warning: subject >50 characters; use shorter first paragraph
remote: commit e3e05ae: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit fd8dcc2: warning: subject >50 characters; use shorter first paragraph
remote: commit bce2795: warning: subject >50 characters; use shorter first paragraph
remote: commit bce2795: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 0c64f16: warning: subject >50 characters; use shorter first paragraph
remote: commit 0c64f16: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 9659625: warning: subject >50 characters; use shorter first paragraph
remote: commit 9659625: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 1eae190: warning: subject >50 characters; use shorter first paragraph
remote: commit fd745f9: warning: subject >50 characters; use shorter first paragraph
remote: commit fd745f9: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit fdc5b0d: warning: subject >50 characters; use shorter first paragraph
remote: commit fdc5b0d: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit d131d0a: warning: subject >50 characters; use shorter first paragraph
remote: commit 87af7e8: warning: subject >50 characters; use shorter first paragraph
remote: commit a3e2f9b: warning: subject >50 characters; use shorter first paragraph
remote: commit dcc940d: warning: subject >50 characters; use shorter first paragraph
remote: commit c9846db: warning: subject >50 characters; use shorter first paragraph
remote: commit ec9b2c7: warning: subject >50 characters; use shorter first paragraph
remote: commit bddcb10: warning: subject >50 characters; use shorter first paragraph
remote: commit bddcb10: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 775d2bf: warning: subject >50 characters; use shorter first paragraph
remote: commit 775d2bf: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 1a85a21: warning: subject >50 characters; use shorter first paragraph
remote: commit ab7c135: warning: subject >50 characters; use shorter first paragraph
remote: commit ab7c135: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 2a81961: warning: subject >50 characters; use shorter first paragraph
remote: commit fdb1e2c: warning: subject >50 characters; use shorter first paragraph
remote: commit fdb1e2c: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit b13ed67: warning: subject >50 characters; use shorter first paragraph
remote: commit 0b47044: warning: subject >50 characters; use shorter first paragraph
remote: commit aad692c: warning: subject >50 characters; use shorter first paragraph
remote: commit 2db1efa: warning: subject >50 characters; use shorter first paragraph
remote: commit 8b39d9f: warning: subject >50 characters; use shorter first paragraph
remote: commit 8b39d9f: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit f23bd7e: warning: subject >50 characters; use shorter first paragraph
remote: commit 76028eb: warning: subject >50 characters; use shorter first paragraph
remote: commit ef8cf09: warning: subject >50 characters; use shorter first paragraph
remote: commit ee79ea0: warning: subject >50 characters; use shorter first paragraph
remote: commit ab0e194: warning: subject >50 characters; use shorter first paragraph
remote: commit fc2310a: warning: subject >50 characters; use shorter first paragraph
remote: commit 6e0be76: warning: subject >50 characters; use shorter first paragraph
remote: commit bd02281: warning: subject >50 characters; use shorter first paragraph
remote: commit bd02281: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 9b5ea4c: warning: subject >50 characters; use shorter first paragraph
remote: commit bb0fdda: warning: subject >50 characters; use shorter first paragraph
remote: commit 0c18c14: warning: subject >50 characters; use shorter first paragraph
remote: commit b8eb448: warning: subject >50 characters; use shorter first paragraph
remote: commit c7ab9dc: warning: subject >50 characters; use shorter first paragraph
remote: commit c7ab9dc: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit c27fa92: warning: subject >50 characters; use shorter first paragraph
remote: commit 5228049: warning: subject >50 characters; use shorter first paragraph
remote: commit 5228049: warning: too many message lines longer than 72 characters; manually wrap lines
remote: commit 92199d5: warning: subject >50 characters; use shorter first paragraph
remote: commit 92199d5: warning: too many message lines longer than 72 characters; manually wrap lines
 ! [remote rejected]       refs/changes/05/73905/1 -> refs/changes/05/73905/1 (transaction aborted)
 ! [remote rejected]       refs/changes/05/73905/2 -> refs/changes/05/73905/2 (transaction aborted)
 ! [remote rejected]       refs/changes/05/73905/3 -> refs/changes/05/73905/3 (transaction aborted)
 ! [remote rejected]       refs/changes/05/73905/meta -> refs/changes/05/73905/meta (failed to lock)
error: failed to push some refs to 'ssh://alaw...@gerrit-test.redacted.com:29418/cms'

Looking at the error_log on the server, I see this:

[2021-02-25T01:31:10.213-08:00] [SSH git-receive-pack /cms (alawrence)] WARN  com.google.gerrit.server.git.MultiProgressMonitor : MultiProgressMonitor worker did not call end() before returning
[2021-02-25T01:31:10.224-08:00] [SSH git-receive-pack /cms (alawrence)] ERROR com.google.gerrit.server.git.receive.AsyncReceiveCommits : error while processing push
java.util.concurrent.ExecutionException: com.google.gerrit.exceptions.StorageException: com.google.gerrit.server.update.UpdateException: com.google.gerrit.git.LockFailureException: Update aborted with one or more lock failures: PackedBatchRefUpdate[
  CREATE: 0000000000000000000000000000000000000000 56ae210343274afcf2966b45c18ba5634c221d11 refs/changes/05/73905/1  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 624995b5ecb24618f44dbac85dae54d8c167407f refs/changes/05/73905/2  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 4ab21664360721af45d68b7e983a8c913f374361 refs/changes/05/73905/3  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 5cee36b36e5e6defa7739233834dfd2df7ff02c3 refs/changes/05/73905/meta  (LOCK_FAILURE)
]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at com.google.gerrit.server.git.receive.AsyncReceiveCommits.preReceive(AsyncReceiveCommits.java:387)
at com.google.gerrit.server.git.receive.AsyncReceiveCommits.lambda$asHook$1(AsyncReceiveCommits.java:332)
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:2206)
at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:2120)
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:98)
at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:108)
at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:73)
at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:488)
at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:103)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:612)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.google.gerrit.exceptions.StorageException: com.google.gerrit.server.update.UpdateException: com.google.gerrit.git.LockFailureException: Update aborted with one or more lock failures: PackedBatchRefUpdate[
  CREATE: 0000000000000000000000000000000000000000 56ae210343274afcf2966b45c18ba5634c221d11 refs/changes/05/73905/1  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 624995b5ecb24618f44dbac85dae54d8c167407f refs/changes/05/73905/2  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 4ab21664360721af45d68b7e983a8c913f374361 refs/changes/05/73905/3  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 5cee36b36e5e6defa7739233834dfd2df7ff02c3 refs/changes/05/73905/meta  (LOCK_FAILURE)
]
at com.google.gerrit.server.git.receive.ReceiveCommits.handleRegularCommands(ReceiveCommits.java:754)
at com.google.gerrit.server.git.receive.ReceiveCommits.processCommandsUnsafe(ReceiveCommits.java:656)
at com.google.gerrit.server.git.receive.ReceiveCommits.processCommands(ReceiveCommits.java:607)
at com.google.gerrit.server.git.receive.AsyncReceiveCommits.lambda$preReceive$3(AsyncReceiveCommits.java:370)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at com.google.gerrit.server.util.RequestScopePropagator.lambda$cleanup$1(RequestScopePropagator.java:182)
at com.google.gerrit.server.util.RequestScopePropagator.lambda$context$0(RequestScopePropagator.java:170)
at com.google.gerrit.server.util.ThreadLocalRequestScopePropagator.lambda$wrapImpl$0(ThreadLocalRequestScopePropagator.java:45)
at com.google.gerrit.server.util.RequestScopePropagator$1.call(RequestScopePropagator.java:85)
at com.google.gerrit.server.util.RequestScopePropagator$2.run(RequestScopePropagator.java:116)
... 8 more
Caused by: com.google.gerrit.server.update.UpdateException: com.google.gerrit.git.LockFailureException: Update aborted with one or more lock failures: PackedBatchRefUpdate[
  CREATE: 0000000000000000000000000000000000000000 56ae210343274afcf2966b45c18ba5634c221d11 refs/changes/05/73905/1  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 624995b5ecb24618f44dbac85dae54d8c167407f refs/changes/05/73905/2  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 4ab21664360721af45d68b7e983a8c913f374361 refs/changes/05/73905/3  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 5cee36b36e5e6defa7739233834dfd2df7ff02c3 refs/changes/05/73905/meta  (LOCK_FAILURE)
]
at com.google.gerrit.server.update.BatchUpdate.wrapAndThrowException(BatchUpdate.java:229)
at com.google.gerrit.server.update.BatchUpdate.execute(BatchUpdate.java:172)
at com.google.gerrit.server.update.SubmissionExecutor.execute(SubmissionExecutor.java:67)
at com.google.gerrit.server.git.receive.ReceiveCommits.handleRegularCommands(ReceiveCommits.java:747)
... 18 more
Caused by: com.google.gerrit.git.LockFailureException: Update aborted with one or more lock failures: PackedBatchRefUpdate[
  CREATE: 0000000000000000000000000000000000000000 56ae210343274afcf2966b45c18ba5634c221d11 refs/changes/05/73905/1  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 624995b5ecb24618f44dbac85dae54d8c167407f refs/changes/05/73905/2  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 4ab21664360721af45d68b7e983a8c913f374361 refs/changes/05/73905/3  (REJECTED_OTHER_REASON: transaction aborted)
  CREATE: 0000000000000000000000000000000000000000 5cee36b36e5e6defa7739233834dfd2df7ff02c3 refs/changes/05/73905/meta  (LOCK_FAILURE)
]
at com.google.gerrit.git.RefUpdateUtil.checkResults(RefUpdateUtil.java:100)
at com.google.gerrit.git.RefUpdateUtil.executeChecked(RefUpdateUtil.java:57)
at com.google.gerrit.server.notedb.NoteDbUpdateManager.execute(NoteDbUpdateManager.java:382)
at com.google.gerrit.server.notedb.NoteDbUpdateManager.execute(NoteDbUpdateManager.java:332)
at com.google.gerrit.server.update.BatchUpdate$ChangesHandle.execute(BatchUpdate.java:588)
at com.google.gerrit.server.update.BatchUpdate.execute(BatchUpdate.java:148)
... 20 more

The lock failure and transaction aborted messages suggest to me that I may simply be trying something bizarre and unnatural that Gerrit just won't allow.  Is there a way to make this work that I'm missing, or is this just not possible?


thanks,
--Andrew

Sven Selberg

unread,
Feb 25, 2021, 5:50:06 AM2/25/21
to Repo and Gerrit Discussion
What you attempted here (from Gerrit's standpoint) is to create a new, branch-like, ref and push the entire commit history to that ref (you'll see three sets of mostly identical warnings for the three patch-sets) I believe this is what confused Gerrit.
A change ref (patch-set) has the immutable characteristics of a tag and can be perceived as such. You first create the commit (usually by pushing to a branch) after which you create the change-ref to point to the commit. Gross simplification but...

If I were to try this recreate-change operation my first attempt would be to go behind Gerrit's back to add the commits and refs to the repo and afterwards ask Gerrit to index the change.
  


thanks,
--Andrew

Reply all
Reply to author
Forward
0 new messages