How are conflicts handled? #148
Comments
|
Edited slightly to make a cleaner title. Thank you! |
|
This is a repetition of some info that's elsewhere in the FAQ. We should gather some of it together for clarity. Relevant Ideas about how IPFS Currently Works
When you write a file into IPFS on a node, it does the following:
Deleting StuffLocal DeletesTo "delete" a file locally,
This removes the file from your local IPFS. (not allowed) Deleting Other People's CopiesThe IPFS protocol does not support deleting content from other people's nodes. This is just like the web currently works -- after someone "downloads" a file from your machine, they control that copy. If you want those peers to delete their copies, that's an out-of-band conversation you need to have beyond the IPFS protocol. Some approaches: smart contracts, emails, phone calls, etc. Answer to the Original QuestionGiven the scenario you describe, where a file is deleted from your node while it's offline. If nobody has ever pulled a copy of your fileIf nobody has ever pulled a copy of your file, it's gone. If any peers have pulled copies of your fileIf any peers have pulled copies of your file AND they still have those copies, meaning they have either pinned the file on their node or they have not yet garbage collected, then the content is still available on the network. Next time you request that content, you will be doing a regular request for content on the network. Your local node will look up the hash for that content in the DHT, find the peers who have copies of the file, and pull the file from those peers. |
|
Thanks to @Kubuxu and @whyrusleeping for helping me write this answer. |
|
This issue was moved to https://discuss.ipfs.io/t/how-are-conflicts-handled/469 |
ulises commentedJul 26, 2016
If a node goes offline, a file is deleted in the node, and then it goes online again (netsplit or proper offline). What does the node do when it comes back online?
IIUC in matrix conflicts are passed on to the clients, so I wonder how these are resolved (if at all) in IPFS.
The text was updated successfully, but these errors were encountered: