Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NC | NSFS] Add mm policy migration rule to kick in every 15 mins #7530

Merged

Conversation

tangledbytes
Copy link
Member

@tangledbytes tangledbytes commented Oct 10, 2023

Explain the changes

This PR adds a new rule to the spectrum scale policies which migrates resident data from disk to tape every 15 minutes along with the restore trigger that happens every 15 minutes.

Why?
Previously, if a user would upload an object to GLACIER storage class and then will issue a recall, they will have to wait at least till 00:15 UTC to be able to get their object back. That is acceptable from S3 protocol perspective IMO as restores can take upto days but in this case we are simply taking more time to restore because the resident files are migrated to the tape at 00:00 UTC and only once migrated we bring them back to the tape (every 15 mins) hence the user will have to wait till 00:15 UTC.

What?
With this PR, we have 3 different flows, one for migrating restored data (aka premigrated data), one for data that was freshly uploaded hence not on tape (aka resident data) and one for restoring data to the disk from tape.
We trigger migration of premigrated data every day at 00:00 UTC as the granularity for restore request is in days and there is no point in issuing it more often.
We trigger the restoration every 15 mins.
We trigger migration of resident data (freshly uploaded data) every 15 mins.

With this PR if a user uploads an object and immediately requests a refresh then at max the restore will take 30 mins (15 mins to first move that data to tape and then 15 to move that data back to disk).

Can there be race between data moving to tape and back to disk in the same flow?
I don't think so. The flows identify the candidates based on their state on the filesystem. If the file is resident, it will be handed over to migration flow while if the file is migrated it will be handed over to the restore flow.

Tested this in the tape simulation environment.

  • Doc added/updated
  • Tests added

@tangledbytes tangledbytes force-pushed the utkarsh/improv/archive-policies branch 2 times, most recently from 738a4a5 to b863372 Compare October 11, 2023 10:19
Copy link
Contributor

@romayalon romayalon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

strip time away from the expiry

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>
@tangledbytes tangledbytes force-pushed the utkarsh/improv/archive-policies branch from b863372 to e5915be Compare October 12, 2023 06:57
@tangledbytes tangledbytes merged commit ae86bb0 into noobaa:master Oct 12, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants