Diagnose distributed database inconsistency | Google Interview Question