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

Guesses the receive metadata for a given queue, using the “with loss” strategy. This equals to the bottom position in the segment after the smallest one present in the directory. This function will substitute the current receive metadata by this guess upon acquiring the receive lock on this queue.

It is important to note two things:

  1. The data in the current segment will be lost.
  2. You don’t need to use this function when replays are acceptable, since the existing metadata file is already a lower bound of the actual state of the queue.

You should use this function if you suppose that 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.