|
The anti-entropy mechanism is used to ensure the backup on different nodes (Replica)Are all in the latest version.
Due to the large processing involved, this mechanism is generally only used for permanent error recovery, not for common read repair. Like Amazon
DynamoSame.
In addition, in order to minimize the data transmission between nodes, before the actual data transmission, each node exchanges the message digest of its own data.. Merkletree will be used in implementation(The leaf node stores data files, not the message of its subnodes.
Digest).
Process
1. Create a repair from node A during the recover Process
Session
2. Repair starts from node A in the recover process.
3. node A obtains the node where the data replica is located from the request information (in this example
Node B and node C)
4. iterate the list of replica nodes
. Send an anti-entropy request to the node through the local message service
B
4.1.1 Node B receives and executes the request
. Send an anti-entropy request to node C through the local message service
4.2.1 node C receives and executes the request
. Send the anti-entropy request
Local node A (yourself)
4.3.1 local node A receives and executes the request
5. initialize merkletree
6. Calculate the hash value of each row of data and add it to merkletree
7. Each node uses its merkletree as the anti-entropy response to send it to the local message service.
7.1 The local message service of each node returns the anti-entropy response to the node
A's message service
8. Ode A collects the merkletree in each anti-entropy response and the local merkletree
(4.3.1 received as local) Different (diff)
9. If necessary, use pipelineout
Remote nodes send new data
10. Request new data from the remote node through pipelinein as needed
|