Bug #14488

[keepstore] Do not try to trash blocks that were already trashed in previous sweep

Added by Tom Clegg 29 days ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Keep
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

There is a time interval -- after keep-balance retrieves keepstore's block index, and before keep-balance sends keepstore a new trash list -- during which keepstore is still processing the last trash list it received from a previous keep-balance sweep.

Blocks that get trashed during this interval will typically appear on the new trash list, too. When keepstore runs the new trash list, it logs errors: the blocks can't be trashed because they don't exist.

This produces logs that are hard to distinguish from real errors, and it wastes time and cloud API calls.

Proposed solution:
  • After a block is successfully trashed, add the block ID to a map of recent trashes.
  • When a new trash list is accepted, remove any block ID that appears in the map of recent trashes, and clear the map of recent trashes.

Also available in: Atom PDF