I don't have a direct answer but since I have been given this some thought previously I thought I'd give my perspective.
It depends on how you define "in sync", generally it's not interesting, if the mirror will catch up eventually
you are only faced with a soft timing problem that there are plenty of workarounds for.
As long as the primary and mirror doesn't share file-system, and the primary is active, primary and mirror will
very seldom be in total sync.
This makes it hard to notice if a difference between primary and mirror is caused by:
* an error
* replication not having caught up yet
* the ref being updated between you read the state from primary and you read the state from mirror.
The only way to really check consistency is to:
1. Set primary in read-only
2. Wait for all ongoing replication to finish
And then:
for all project,ref in primary.intersection(mirror):
assert(sha1_of(primary, project, ref) is equal to sha1_of(mirror, project, ref)
but that's fairly intrusive and as Luca pointed out:
If you don't see any problems chances are you don't have any.
If you see problems you probably get a better ROI from trying to find and fix the root cause then determine momentary
consistency.
I know from experience that customers/stakeholders may come with the "low hanging fruit" argument of "why don't
you just check for consistency!?" when they experience issues with primary and mirror not being in sync but it's just
not possible to check that on a running system.
If constant consistency is a hard requirement you probably need to switch to a multi-primary setup so that you can wait for
consistency within the scope of the individual git-transaction.
If you choose to go this route Luca is the expert.
Thank you,
Anish