Hi repo-discuss,
`gerrit.war reindex` fails when trying to build a new container, with an exception like:
#10 7.938 Caused by: java.util.concurrent.ExecutionException: org.apache.lucene.store.AlreadyClosedException: Underlying file changed by an external force at 2024-07-16T01:03:31.893102472Z, (lock=NativeFSLock(path=/var/gerrit/index/projects_0008/write.lock,impl=sun.nio.ch.FileLockImpl[0:9223372036854775807 exclusive valid],creationTime=2024-07-16T01:03:23.637094616Z))
(full logs attached)
Does anyone have a clue what could cause this failure, or how to work around it?
Context: I'm trying to create a customized Gerrit Docker container for my team's use, bundling some plugins we want. I based my container on the open-source one [1], but with a number of significant modifications. In particular, I'm using Red Hat UBI9 w/Java17 JRE [2], rather than almalinux or ubuntu as is used in the open-source one (because we have a support contract with RedHat, and are Strongly Advised™️ to use that).
I've attached the Dockerfile, init.sh script that runs gerrit.war init & reindex, and shell log with the full Java/Lucene stack trace of the failed reindex.