-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 3.4.0, 4.2.0, 4.6.0
-
Component/s: Mesh
-
None
-
Severity 2 - Major
Issue Summary
When Bitbucket Mesh nodes in the same cluster run different Git versions, a repository can stay INCONSISTENT indefinitely. This affects clusters that mix Git 2.40 or earlier with Git 2.41 or later. It only affects repositories with a one-level ref, which is a ref directly under refs/ such as refs/MyRef.
The different Git versions lead to different content hashes for repositories, so nodes cannot complete replication. Even though the refs are identical across nodes, repair runs continuously and never resolves.
Mesh calculates the content hash from git ls-remote --refs. Git 2.40 and earlier filter one-level refs out of that output, and Git 2.41 and later include them.
Repair compares refs with plain git ls-remote, which always includes one-level refs in every Git version.
Steps to Reproduce
- Have a mesh cluster with nodes on either side of Git 2.41. For example 2.39.5 on some nodes and 2.47.3 on others
- Have a repository that has some "one-level refs", meaning a ref directly under refs/ such as refs/MyRef
- Make a change to Git content that leads to replication across mesh nodes
Expected Results
Repository content hashes agree across all mesh nodes, Aand replication completes normally.
Actual Results
Mesh (these repeat every few seconds):
<timestamp> INFO [main] c.a.b.m.g.b.DefaultGitBinaryHelper Using /usr/bin/git (2.47.3) <timestamp> DEBUG [grpc-client:thread-209] c.a.b.m.r.DefaultInteractiveRepairHelper [<partition>-<hierarchy>-<repo_id>] Processed 141 source refs and 141 target refs <timestamp> DEBUG [grpc-client:thread-209] c.a.b.m.r.DefaultRepositoryHashService [<partition>-<hierarchy>-<repo_id>] Calculated content hash (Full): <hash> <timestamp> INFO [repair:thread-12] c.a.b.m.repair.DefaultRepairManager [p/<partition>/h/<hierarchy>/r/<repo_id>] Still not consistent after repair from <source-node>. Rescheduling repair
Workaround
Run the same Git version on all nodes. Alternatively, deleting one-level refs will also resolve the issue.