Two paths to the files hashing to the same value
Theoretically, two inputs to the hash function can result in the same output. Suppose that path accountA/
Based on the hash, partition is calculated. Since hashes are the same, the partition will be the same. And since datadir directory is created based on hash, these two objects will end up in the same directory.
Then, when an object is uploaded, it is stored in datadir and receives the name which equals to the timestamp. All the other files in that directory with older timestamp are deleted. So if objectA was uploaded before objectB, upon upload of objectB, objectA will be deleted.
Am I wrong somewhere in my reasoning?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Rostik Slipetskyy for more information if necessary.