fix: documentation fixes for docker ENV settings (#9975)

- update CREDITS file
- fix markdown links
- talk a bit more about upgrades
This commit is contained in:
Harshavardhana
2020-07-06 06:42:34 -07:00
committed by GitHub
parent 4cf80f96ad
commit 38eef5ce4c
5 changed files with 154 additions and 5678 deletions

View File

@@ -79,9 +79,13 @@ Expected expansion
- Choosing an erasure set for the object is decided during `PutObject()`, object names are used to find the right erasure set using the following pseudo code.
```go
// hashes the key returning an integer.
func crcHashMod(key string, cardinality int) int {
keyCrc := crc32.Checksum([]byte(key), crc32.IEEETable)
return int(keyCrc % uint32(cardinality))
func sipHashMod(key string, cardinality int, id [16]byte) int {
if cardinality <= 0 {
return -1
}
sip := siphash.New(id[:])
sip.Write([]byte(key))
return int(sip.Sum64() % uint64(cardinality))
}
```
Input for the key is the object name specified in `PutObject()`, returns a unique index. This index is one of the erasure sets where the object will reside. This function is a consistent hash for a given object name i.e for a given object name the index returned is always the same.