The previous article introduced the feedsync synchronization process for modifying data on two computers at the same time. Today we will discuss the situation of deleting the same data on two computers at the same time.
Assume that the data in the original feed is as follows:
<Item>
<SX: Sync id = "ep2.100" updates = "1" deleted = "false" noconflicts = "false">
<SX: History sequence = "1" when = "2007-11-29t06: 27: 12z" by = "B"/>
</SX: Sync>
<Title> return books to library </title>
<Description> 2 books in total </description>
</Item>
Next, I will delete "return books to library" on computer A, and do not synchronize with the server at the moment. Then, go to computer B. Because computer B has not been synchronized, there is "return books to library" on computer B, and I will delete it.
At this time, the feed on computer
<Item>
<SX: Sync id = "ep2.100" updates = "2" deleted = "true" noconflicts = "false">
<SX: History sequence = "2" when = "2007-11-29t06: 27: 16z" by = "A"/>
<SX: History sequence = "1" when = "2007-11-29t06: 27: 12z" by = "B"/>
</SX: Sync>
<Title> return books to library </title>
<Description> 2 books in total </description>
</Item>
Feed on computer B
<Item>
<SX: Sync id = "ep2.100" updates = "2" deleted = "true" noconflicts = "false">
<SX: History sequence = "2" when = "2007-11-29t06: 27: 18z" by = "B"/>
<SX: History sequence = "1" when = "2007-11-29t06: 27: 12z" by = "B"/>
</SX: Sync>
<Title> return books to library </title>
<Description> 2 books in total </description>
</Item>
At this time, synchronize the feed on the computer A, B, and server
<Item>
<SX: Sync id = "ep2.100" updates = "2" deleted = "true" noconflicts = "false">
<SX: History sequence = "2" when = "2007-11-29t06: 27: 18z" by = "B"/>
<SX: History sequence = "1" when = "2007-11-29t06: 27: 12z" by = "B"/>
<SX: Conflicts>
<Item>
<SX: Sync id = "ep2.100" updates = "2" deleted = "true" noconflicts = "false">
<SX: History sequence = "2" when = "2007-11-29t06: 27: 16z" by = "A"/>
<SX: History sequence = "1" when = "2007-11-29t06: 27: 12z" by = "B"/>
</SX: Sync>
<Title> return books to library </title>
<Description> 2 books in total </description>
</Item>
</SX: Conflicts>
</SX: Sync>
<Title> return books to library </title>
<Description> 2 books in total </description>
</Item>
We can see that the modified data still exists in the feed file and does not disappear because it is deleted, but the attribute deleted ="True". Although the operations on the two computers are the same, the operations on the computer a are still saved in the conflict list <SX: Conflicts>.