Skip to content

Conversation

terinjokes
Copy link
Contributor

When uploading segments to Swift, the registry generates a random file,
by taking the hash of the container path and 32-bytes of random data.
The registry attempts to shard across multiple directory paths, by
taking the first three hex characters as leader.

The implementation in registry, unfortunately, takes the hash of
nothing, and appends it to the path and random data. This results in all
segments being created in one directory.

Fixes: #2407
Fixes: #2311
Signed-off-by: Terin Stock terinjokes@gmail.com

When uploading segments to Swift, the registry generates a random file,
by taking the hash of the container path and 32-bytes of random data.
The registry attempts to shard across multiple directory paths, by
taking the first three hex characters as leader.

The implementation in registry, unfortunately, takes the hash of
nothing, and appends it to the path and random data. This results in all
segments being created in one directory.

Fixes: distribution#2407
Fixes: distribution#2311
Signed-off-by: Terin Stock <terinjokes@gmail.com>
@codecov
Copy link

codecov bot commented Jun 23, 2019

Codecov Report

Merging #2950 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2950   +/-   ##
=======================================
  Coverage   60.45%   60.45%           
=======================================
  Files         102      102           
  Lines        8002     8002           
=======================================
  Hits         4838     4838           
  Misses       2515     2515           
  Partials      649      649
Flag Coverage Δ
#linux 60.45% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79f6bcb...b23dd1e. Read the comment docs.

Copy link
Contributor

@caervs caervs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@caervs caervs merged commit 1fb7fff into distribution:master Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants