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

Fix ignoring of IntegrityError in FileCacher #59

Open
giomasce opened this issue Oct 14, 2012 · 0 comments
Open

Fix ignoring of IntegrityError in FileCacher #59

giomasce opened this issue Oct 14, 2012 · 0 comments

Comments

@giomasce
Copy link
Member

See the description of commit e2358b7, quoted here for convenience:

Ignore IntegrityError when pushing a file to the database.

Such IntegrityError is probably due to the concurrent access to
the database by more than one process: by default, PostgreSQL
enforces only a partial isolation level between concurrent
transactions, so it can happen that two get_from_digest() doesn't
detect a file, but the file exists at the moment of actually
committing the transaction.

This commit requires further intervention, since we should at least
check that the IntegrityError actually comes from such a condition.

For more information about isolation levels:

http://www.postgresql.org/docs/9.1/static/transaction-iso.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant