Skip to content

Accounting issue with receive-only deleted files causing spurious 95% completion for remote devices #6961

Closed

Description

@calmh

An existing in-sync file can be changed and then deleted on a receive-only device. This results in two updates, (1) a file change and (2) a file delete, each with the invalid version (empty) and the invalid bit set. If the proper version is then withdrawn from the cluster (because all devices that had them are removed from the config, for example) we will "upgrade" this locally-changed deleted file to a regular deleted file (no invalid bit) but retain the invalid version to ensure it will never override a real file version, should it reappear.

The result in the database is a global file entry with the empty version, and the delete-bit unset. The delete bit is unset because it changed without the version changing between updates 1 and 2.

A separate but related factor is how we handle delete records for files we don't have: we simply ignore them. This means that most other devices will not announce anything at all for this zero-version deleted file.

When running a database repair or metadata recovery we will look at all global file entries and compute the need requirements for all devices. At this point it looks like there is a valid non-deleted file that is not present in the announcements from other devices, hence it gets added to their "need" counter.

At this point the need counter is wrong and the device looks like "95% in sync" from our perspective...

Activity

  1. added
    bug
    needs-triage
    on Sep 7, 2020
  2. removed
    needs-triage
    on Sep 7, 2020
  3. added a commit that references this issue on Sep 7, 2020
    bceeb8e
  4. added a commit that references this issue on Sep 7, 2020
    674fca3
  5. added this to the v1.10.0 milestone on Sep 7, 2020
  6. added a commit that references this issue on Sep 24, 2020
    c77cef8
  7. added
    frozen-due-to-age
    on Sep 8, 2021
  8. locked and limited conversation to collaborators on Sep 8, 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-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions