The invention discloses a bidirectional replication consistency checking and repairing method based on a
record source identifier, particularly relates to the technical field of
data consistency of a
distributed memory database, and is used for solving the problem that a bidirectional replication cluster is difficult to accurately identify a
record source, missing and conflicts in a non-stop scene, so that the reliability of the bidirectional replication cluster is improved. Therefore, the problems of difficulty in consistency
verification, high possibility of false difference and repeated modification are solved. A deletion mark, a lock mark and a source mark are coded in a
record control area in a centralized manner, a
primary key field and a source pseudo column are used as anchor points, and an idempotent identifier constructed based on a
primary key and a version field, a fragment comparison process divided according to a
verification window and a
primary key range and an automatic repair decision oriented to missing records and records with inconsistent fields are combined; therefore, the real difference can still be accurately recognized under the condition of bidirectional replication
continuous operation, replication
loopback and false inconsistency are avoided, and the consistency of the
business data of the memory
database clusters on the two sides is kept on the premise that business writing is not stopped.