Comments (5)
How does git handle collisions? Or it assumes that with 32 chars the collision will never happen?
from hashdist.
First, git has 40 chars (both git and hashdist use 160 bits, but bit uses base-16 and we base-32).
And with 160 bits, collisions will not happen (the chance is so low it's almost not an assumption; except if there are mathematical weaknesses in SHA-1 (git) or SHA-2 (hashdist)).
(If we simply include all 32 characters in the main artifact prefix path itself, we don't need to worry either, but I really like the shorter path.)
Here's what happens with git: If you have a collision, the first object to hit your .git/objects
is the one that wins. Another object with the same commit simply never gets fetched or downloaded.
from hashdist.
I now believe this must be done.
UI when having a full collision, instead of growing hash we do:
$ hit build
...
The target directory ~/.hashdist/ba/numpy/qmplawvo3kyy already exists.
This may be because of an earlier sudden crash, or because somebody
else is currently performing the build on a shared filesystem. Please run "hit purge numpy/qmplawvo3kyy" to manually clean out the directory.
Collision on short part only:
$ hit build
WARNING: An artifact with a hash that agrees in the first 12 characters
is already installed. The two hashes are:
numpy/qmplawvo3kyyvgo54pcazh4pnvfyjz53 (installed)
numpy/qmplawvo3kyyh4pnvfyf8s3vgo54pcaz (wants to install)
The odds of this happening due to chance are very low. Please get in touch with the Hashdist developer mailing list.
from hashdist.
How did you manage to hit the hash collision? Or is the probability not that low.
In any case, yes, it should get done.
from hashdist.
What? I just made those examples up. I haven't hit any collisions, no.
from hashdist.
Related Issues (20)
- install fails (hashcode differs from the expectedone)
- add environment variable for hashdist home
- OSX cannot download openssl HOT 10
- HashDist fails to download package if not in source cache mirror
- Diamond inheritance not supported
- --with-mpi=1 is added to configure line HOT 2
- keep build folder, sources and object files for possible debugging HOT 3
- check for git in PATH when source is a Git repo
- Retries are not robust enough
- Force to rebuild everything, ignoring installed packages HOT 2
- Not the same environment for a debug and a non-debug build HOT 3
- Error installing FEniCS on MacOSX with hashdist
- hash differs for libadjoint-1.5
- HashDist fenics instalation in a i7 6700 laptop falis due to lapack not finding my CPU architecture HOT 2
- [zmq|ERROR] Command '[u'/bin/bash', '_hashdist/build.sh']' returned non-zero exit status 1 HOT 1
- OSX TSL1.1+ woes
- Support Python3 or fail properly
- Allow to download sources without building them HOT 1
- ConstructorError: while constructing a mapping HOT 1
- module load package in prologue without rebuild all
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashdist.