pub fn recover_with_loss<P: AsRef<Path>>(base: P) -> Result<()>
Expand description

Recovers a queue using the “with loss” strategy.

It applies the following operations, in this order:

  • Unlocks both the sender and receiver side of the queue.
  • Guesses the position of the receiver using guess_recv_metadata_with_loss (this truncates the bottom segment of the queue, resulting in data loss).

This means that some of the data may be lost, since the bottom segment is erased. If data loss is not acceptable, see recover.

You should not use recover if you suppose your data was corrupted.

Panics

This function panics if there is a file in the queue folder with extension .q whose name is not an integer, such as foo.q or if the lock files for either sending or receiving cannot be parsed.