Skip to content

Defer/async cache validation at start up? #513

@gforcada

Description

@gforcada

Whenever a server using RelStorage is being started it validates the local cache against the database, as it can be seen on the following log line:

2025-02-28 17:26:31,649 INFO    [relstorage.cache.mvcc:525][MainThread] Polling 160420 oids stored in cache with SQL timeout None

Unfortunately, that can be veeeeeeery slow, leading to very slow start up, or worse, having a website downtime because all servers (as, e.g. you deploy a new update) are being restarted.

Could this validation be done asynchronously? Would that be a problem for running queries while these 160k objects are being validated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions