Skip to content
This repository was archived by the owner on Mar 9, 2019. It is now read-only.
This repository was archived by the owner on Mar 9, 2019. It is now read-only.

Meta2 make DBFile invalid #744

@qw4990

Description

@qw4990

Write-Transactions update Meta1 on commit, and Meta2 only be updated at Backup (invoke tx.WriteTo);

So, please consider this case:

  1. Assume my DB's freelist is stored in Page34, and I backup it now; Then the page id of freelist in meta2 is 34 now;
  2. Then I do some write-transactions on the new DB file, obviously the Page34 maybe reallocated as a branch page or a leaf page;
  3. If meta1 is written to broken now, then meta2 is used, and the Page34 is regard as a freelist page again;

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