Skip to content

Database migration can lead to missing blocks error #6389

Closed

Description

@calmh

There is a problem in the latest database migration, where

  1. the block GC can run concurrently with the migration, and
  2. the block GC doesn't properly use a snapshot for all its operations.

If the database is large then the block GC routine will take time and read FileInfos (none of which have block hashes yet) while the migration runs. The migration creates block list entries in the meantime. Then the block GC starts iterating block lists, without a snapshot, so it sees the new entries and deletes them because the FileInfos didn't refer to them when it saw those.

The end result is erroneously deleted block lists.

Activity

  1. added
    bug
    skip-changelog
    on Feb 29, 2020
  2. added 2 commits that reference this issue on Feb 29, 2020
    8a389b3
    0215df7
  3. added this to the v1.4.0 milestone on Feb 29, 2020
  4. added 4 commits that reference this issue on Feb 29, 2020
    52e72e0
    6b5c281
    5184334
    e4e5f05
  5. added
    frozen-due-to-age
    on Mar 1, 2021
  6. locked and limited conversation to collaborators on Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-ageskip-changelog

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions