Staggered versioning most recent or least recent?

I’m trying to wrap my head around what would happen if I overwrite a file multiple times in rapid succession with the staggered versioning and I feel the documentation is wrong.

In the documentation for the staggered versioning, it says that the most recent version is kept for each interval:

For the first hour, the most recent version is kept every 30 seconds.

For example, if there is a file with the content A and it’s:

  • overwritten at 11:50:02 with B
  • then overwritten at 11:50:15 with C

then the most recent version contains B, and A is lost. This is because 11:50:02 is the A version, and 11:50:15 is the B version, and the B version is more recent.

But this contradicts what I see in practice and from the code.

In the staggered versioning test, there are 3 versions : 1, 29, and 30 seconds ago. And it deletes the first two, leaving the oldest version.

In the codebase for the staggered version, the for loop goes from oldest to newest and it checks the distance from the previous one, which keeps the oldest one in each interval.

Am I interpreting the docs in a wrong way?

I can honestly say I’ve never fully bothered to understand the staggered versioning in detail, but imagining versions moving along a timeline marching-ants style it makes sense to me that we’d kill them off when they go from one time window into the next – that is, keeping the oldest versions in each time window.

1 Like

As it seems you have it figured out pretty much in detail, it would be very nice if you could adjust the docs such that they adequately describe what actually happens.

Sure, happy to do it. Just wanted to first check if I’m interpreting the code and the test cases right and the documentation is wrong here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.