error: Could not read from object database for commit-graph
We have a client that noticed errors in the Repocheck.log for a specific repository, but was unable to replicate the errors locally or directly on the server. All git operations seem to function as expected.
Error Log
error: Could not read 060c84fa027c70716bba78e65668c17c0422dd76
failed to parse commit 060c84fa027c70716bba78e65668c17c0422dd76 from object database for commit-graph
error: Could not read 077f95dcc2066055e62bb915bfd20bed7c06df67
failed to parse commit 077f95dcc2066055e62bb915bfd20bed7c06df67 from object database for commit-graph
error: Could not read 07e1ab57c84f33e191b63ca0b6db95c5f936774b
failed to parse commit 07e1ab57c84f33e191b63ca0b6db95c5f936774b from object database for commit-graph
error: Could not read 083d28b7d625a009db56b2b3a92639a38ada5633
failed to parse commit 083d28b7d625a009db56b2b3a92639a38ada5633 from object database for commit-graph
....100 more
Git Versions
opt/gitlab/embedded/bin/git --version
git version 2.22.0
Server:
git --version
git version 2.17.1
Locally:
git --version
git version 2.20.1
It seems that git version 2.22.0 would throw errors when executing git fsck, while previous versions would not report anything wrong (older versions only reported dangling commits, while the newer one exits with errors).
As I mentioned above, seems that cloning locally (git version 2.20.1) works and running git fsck works as expected, but if the data is copied directly from the server to the local machine it fails with the same errors.
fix
- Further details about this issue, especially with GitLab 15.0 - #2359 (comment 966195929)
- Procedure for single node Gitaly - #2359 (comment 966250401) (including Helm / CNG deployments)
- Procedure for Gitaly cluster - #2359 (comment 967699794)
Edited by Ben Prescott_