Skip to content

Fix ignoring of IntegrityError in FileCacher #59

@giomasce

Description

@giomasce

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions