git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Hash collision count

From
JGJeff Garzik <jgarzik@pobox.com>
Date
Apr 24, 2005, 00:35 UTC
Message-ID
<426AE9ED.4060005@pobox.com>
In-Reply-To
<20050423234637.GS13222@pasky.ji.cz>
Petr Baudis wrote:
Show 9 quoted lines
> Dear diary, on Sun, Apr 24, 2005 at 01:20:21AM CEST, I got a letter
> where Jeff Garzik <jgarzik@pobox.com> told me that...
> 
>>Second, in your scenario, it's highly unlikely you would get 4 billion 
>>sha1 hash collisions, even if you had the disk space to store such a git 
>>database.
> 
> 
> It's highly unlikely you would get a _single_ collision.
Agreed.
Show 9 quoted lines
>>First, the hash is NOT unique.
>>
>>Second, you lose data if you pretend it is unique.  I don't like losing 
>>data.
> 
> 
> *sigh*
> 
> We've been through this before, haven't we?
<shrug>

In messing around with archive servers, people get nervous using (hash,value) based storage if there isn't even a simple test for collisions.

Someone just told me that one implementation of the Venti archive server[1] simply fails the write, if a data item exists with a duplicate hash value. As long as git fails or does something -predictable- in the face of the hash collision, I'm satisfied.

	Jeff
[1] http://www.cs.bell-labs.com/sys/doc/venti/venti.html
Previous: Petr BaudisNext: Petr Baudis
Message 6 of 14 in “Hash collision count”
  1. Jeff GarzikApr 23, 2005
  2. Jeff GarzikApr 23, 2005
  3. Ray HeasmanApr 23, 2005
  4. Jeff GarzikApr 23, 2005
  5. Petr BaudisApr 23, 2005
  6. Jeff GarzikApr 24, 2005
  7. Petr BaudisApr 24, 2005
  8. Jeff GarzikApr 24, 2005
  9. Imre SimonApr 24, 2005
  10. Whales falling on houses - was: Hash collision countJon Seymour, Apr 24, 2005
  11. Tom LordApr 25, 2005
  12. Petr BaudisApr 26, 2005
  13. Ray HeasmanApr 24, 2005
  14. David LangApr 24, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.