Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip loading readme files if it won't fit in the DB #299

Merged

Conversation

QuietMisdreavus
Copy link
Member

Some crates have excessively long README files, that are too big for the database column. This PR changes the README loading function to discard a README if it wouldn't fit in the database, using a similar check that the read_rust_doc function uses.

@onur
Copy link
Member

onur commented Feb 15, 2019

Interesting I thought 50KB should be enough for README files (I have no idea why I assumed first TBH). Maybe instead of ignoring this files, we can increase storage size in the database.

@QuietMisdreavus
Copy link
Member Author

That would be a schema change; should we wait for #305 to land first?

@QuietMisdreavus
Copy link
Member Author

Actually, i'm not sure increasing the size of the column is a good long-term fix - someone will wind up making an even longer README than what we decide on, whether accidentally or deliberately. We should have a way to properly deal with those crates. Right now they just sit in the queue at maximum attempts and don't even register as failed.

@QuietMisdreavus
Copy link
Member Author

I'm going to go ahead and merge this in, since it echoes the code in read_rust_doc farther down the file. #305 is merged now, so we can easily increase the storage size for READMEs and doc headers in the future, but for now, i'd rather put this guard in. This will allow more crates to be loaded in.

@QuietMisdreavus QuietMisdreavus merged commit 266c4af into rust-lang:master May 3, 2019
@QuietMisdreavus QuietMisdreavus deleted the long-long-readmes branch May 3, 2019 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants