On 11 Jan 2023, at 09:46, Sven Selberg <sven.s...@axis.com> wrote:On Wednesday, January 11, 2023 at 12:59:00 AM UTC+1 phan....@gmail.com wrote:Are these “want <sha1> not value” happening *whilst* you are pushing the tags?
Luca.It's after pushing a lot of tags that the clone operation for the next Jenkins run fails. The job creates and deletes close to 600 tags every 5 mins.I think there's your issue.First of all, you should never delete tags!
Secondly, we have discovered that when deleting refs for a highly requested repository you can end up in a timing situation where (something like) this happens:1. Client: "these are my refs, show me yours [...]"2. Server: "these are my refs [..., {refs/tags/tag-that-will-be-deleted, abc123}, ...]"3. Server: ref refs/tags/tag-that-will-be-deleted is deleted.4. Client: "I want [..., {refs/tags/tag-that-will-be-deleted, abc123}, ...]'"5. Server: "Want not valid"
We fixed this issue by starting to use protocol version 2 [1] where this situation is mitigated.
--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/d746cefb-955d-4212-afad-828d2d82d95an%40googlegroups.com.
On 23 Jan 2023, at 07:26, euph...@gmail.com <euph...@gmail.com> wrote:I suspect there is a concurrency issue in here on the Gerrit server side. I have a busy repository that I've started seeing want not valid errors with while doing a git remote update on a client. When I go look at the Gerrit server, I find that the ref that the error is being reported on was pushed to the server shortly before the git remote update was run by the client (it's still there, and hasn't been deleted). I would think that if the receive-pack is done and Gerrit is advertising that new ref to another client, that ref should be valid when that client asks for it.It's pretty easy for me to reproduce. I have a fairly active repo on my Gerrit server. I did a git clone --mirror onto a client and set up a job to do a git remote update on it once a minute. I started seeing want not valid errors immediately. The largest lag I've measured so far was a failure on a commit that had been pushed in 19 seconds before the git remote update was run.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/fe0aea3a-5e88-4cab-8a80-848056f1badan%40googlegroups.com.
Hi,We have a repo where this happens several times a day causing Jenkins jobs to fail. I would not call the repo busy, I see 50 changes today. Is there anything I can do to mitigate this?BR Anna
On Friday, August 18, 2023 at 5:37:18 AM UTC-7 anna.fr...@gmail.com wrote:Hi,We have a repo where this happens several times a day causing Jenkins jobs to fail. I would not call the repo busy, I see 50 changes today. Is there anything I can do to mitigate this?BR AnnaIf you're hitting the same problem I was (Gerrit advertising a newly pushed ref, then giving a want not valid to a client after advertising that new ref to the client) on a less-busy repo, then there's a couple of things you could try. If you're using the Gerrit Trigger plugin in Jenkins and triggering on Patchset Created, then your odds of hitting this are higher, because your Jenkins job is starting right after the new ref came in (and probably starts by fetching from your repo). You could increase the Quiet Period setting in your job from the default 5 seconds to 30. Or you could try adding a sleep at the beginning of the job. If you're using scripted pipelines, you could also wrap your checkout steps and sh steps that run git commands in a try/catch block, and retry when they fail (which is what I've been doing).--Andrew
--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/e43d8b88-de05-4f3d-868e-39a8dffc5f39n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/3F4D6357-6A61-43A7-88B3-7982AAE45D76%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/A0AA1580-FDDB-48A7-AD19-F78B48A67824%40gmail.com.
As of now, can you tell me what users can do if they face this issue? I assume just more retries, but even that sometimes doesn't help.
--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/cf32a8d9-2310-405d-8aed-18b11265ca24n%40googlegroups.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/724ab04e-488e-49a7-bd97-2506b38bde80n%40googlegroups.com.
What to do if the suggested workaround doesn't help (in 3.4)? Does this issue happen in versions beyond 3.4?The solution is to use the uploadpack.allowAnySHA1InWant in jgit.config, which isn’t support on Gerrit v3.4 because both Gerrit and JGit are EOLs.
--
--
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.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/0dfc77f2-3a4c-47a1-91f9-f2967159442en%40googlegroups.com.