Nick Gerakines
unread,Mar 5, 2013, 10:44:44 AM3/5/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to camli...@googlegroups.com
Has anyone implemented a way to iterate over a list of blobs that may have multiple hashes associated with them?
I've been thinking about the case where a blob server may have a series of bytes {72, 101, 108, 108, 111} with a default hashing function of sha1 (f572d396fae9206628714fb2ce00f72e94f2258f). Another client comes along and puts the same byte array in (hooray) but with sha256 ("5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03"). Now, the blob server has a single blob with two references for it, so internally it should just be a single payload with multiple refs.
When enumerating over all of the blobs that the server has, I expect the list of refs to contain possible duplicates. As in both the sha256 and sha1 refs will be provided and it is up to the consumer of that API to fetch both and determine that they are duplicates. The downside is that duplicate data will be transmitted and both ends have to validate blob hashes when they are given them and when sync operations occur.
Is there a better way to handle this?