Skip to content

Conversation

@tonyo
Copy link
Contributor

@tonyo tonyo commented Nov 23, 2018

Before the change newly generated file names looked like this:
17858/55997/18b0ec4fa3ea43e78502b7d2758e0ab1
After the change:
ab/a27f/fe029b475f83b5f30e3da8b164

It gives us 256 directories at the top level, with maximum 65536 directories at the second level, and 2**104 leaves.

The main motivation for the change is to achieve more even name distribution for the GCS storage backend.
This shouldn't affect any existing files on any of the supported backends (filesystem, gcs, s3).

#sync-getsentry

size = 0
checksum = sha1()
while 1:
while True:
Copy link
Contributor

Choose a reason for hiding this comment

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

not that it matters much but while 1 is optimized in python 2 and while True is not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

autopep8 changed those automatically, so not really sure we want to fight it.

@tonyo tonyo merged commit 414dc89 into master Nov 26, 2018
@tonyo tonyo deleted the ref/change-file-blob-naming branch November 26, 2018 17:27
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants