We migrated the OCFL-root to the S3 and few objects are giving issues like below exception.
We tried to do rebuild index and it gave the same issue.
rebuild stopped after the error: ERROR 19:48:53.299 [ScheduledTask1] (ReindexManager) Reindex did not complete successfully
INFO 19:48:53.300 [ScheduledTask1] (IndexBuilderImpl) Index rebuild completed 841 objects successfully and 1 objects had errors in 7 mins, 56 seconds
INFO 19:45:56.334 [Thread-7] (ReindexManager) Index rebuild progress: Complete: 500; Errored: 0; Skipped: 0, Time: 5 mins, 0 secs; Rate: 1/s
ERROR 19:48:53.286 [ReindexWorker-0] (ReindexWorker) Reindexing of OCFL id info:fedora/objects/6c16d395-9755-4409-aefe-8d2cd0cb7405/DS1 failed
org.fcrepo.storage.ocfl.exception.ValidationException: OCFL object info:fedora/objects/6c16d395-9755-4409-aefe-8d2cd0cb7405/DS1 is not a valid Fedora 6 object. The following problems were identified:
1. The OCFL object cannot be read: Invalid mutable HEAD inventory in object info:fedora/objects/6c16d395-9755-4409-aefe-8d2cd0cb7405/DS1
at org.fcrepo.storage.ocfl.exception.ValidationException.createForObject(ValidationException.java:48)
at org.fcrepo.storage.ocfl.validation.Context.throwValidationException(Context.java:64)
at org.fcrepo.storage.ocfl.validation.ObjectValidator$ObjectValidatorInner.readInventory(ObjectValidator.java:447)
at org.fcrepo.storage.ocfl.validation.ObjectValidator$ObjectValidatorInner.validate(ObjectValidator.java:92)
at org.fcrepo.storage.ocfl.validation.ObjectValidator.validate(ObjectValidator.java:73)
at org.fcrepo.persistence.ocfl.impl.ReindexService.indexOcflObject(ReindexService.java:105)
at org.fcrepo.persistence.ocfl.impl.ReindexWorker.lambda$run$0(ReindexWorker.java:109)
at org.fcrepo.common.db.DbTransactionExecutor.lambda$doInTx$3(DbTransactionExecutor.java:79)
at org.springframework.transaction.support.TransactionOperations.lambda$executeWithoutResult$0(TransactionOperations.java:68)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
at org.springframework.transaction.support.TransactionOperations.executeWithoutResult(TransactionOperations.java:67)
at org.fcrepo.common.db.DbTransactionExecutor.doInTx(DbTransactionExecutor.java:78)
at org.fcrepo.common.db.DbTransactionExecutor.lambda$doInTxWithRetry$2(DbTransactionExecutor.java:62)
at net.jodah.failsafe.Functions.lambda$toSupplier$10(Functions.java:262)
at net.jodah.failsafe.Functions.lambda$get$0(Functions.java:48)
at net.jodah.failsafe.RetryPolicyExecutor.lambda$supply$0(RetryPolicyExecutor.java:66)
at net.jodah.failsafe.Execution.executeSync(Execution.java:128)
at net.jodah.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:379)
at net.jodah.failsafe.FailsafeExecutor.run(FailsafeExecutor.java:212)
at org.fcrepo.common.db.DbTransactionExecutor.doInTxWithRetry(DbTransactionExecutor.java:61)
at org.fcrepo.persistence.ocfl.impl.ReindexWorker.run(ReindexWorker.java:108)
at java.base/java.lang.Thread.run(Thread.java:840)
Exception in thread "ReindexWorker-0" org.fcrepo.storage.ocfl.exception.ValidationException: OCFL object info:fedora/objects/6c16d395-9755-4409-aefe-8d2cd0cb7405/DS1 is not a valid Fedora