Skip to content

Properly expire ext storage versions (#26601)#2824

Merged
MorrisJobke merged 1 commit into
masterfrom
ext-storage-expireversions
Mar 17, 2017
Merged

Properly expire ext storage versions (#26601)#2824
MorrisJobke merged 1 commit into
masterfrom
ext-storage-expireversions

Conversation

@LukasReschke

Copy link
Copy Markdown
Member
  • Properly expire ext storage versions

System-wide external storages have no real owner so the current user is
used as owner. However when running cron.php there is no current user,
so no expiry can be done.

This fix adds an user argument to the expire() function to tell for
which user to expire files. This information is anyway always available
now through the expire command job.

  • Move version expire setupFS into the expire function

  • Add comment about not tearing down in version Storage::expire()

From owncloud/core#26601

@LukasReschke LukasReschke added 3. to review Waiting for reviews downstream labels Dec 22, 2016
@LukasReschke LukasReschke added this to the Nextcloud 12.0 milestone Dec 22, 2016
@mention-bot

Copy link
Copy Markdown

@LukasReschke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @MorrisJobke and @bartv2 to be potential reviewers.

@icewind1991

Copy link
Copy Markdown
Member

Can we have a test for the background job that covers this?

@LukasReschke

Copy link
Copy Markdown
Member Author

Can we have a test for the background job that covers this?

Sure… Just needs somebody do it 😉

I may do that later, but likely not this week… So any volunteers are welcome. :)

@ka0tik0

ka0tik0 commented Feb 2, 2017

Copy link
Copy Markdown

Tried this solution and is working fine with a lot of external mounts......
Can yoy review and commit this, please :p

@rullzer rullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Time to get this in!

* Properly expire ext storage versions

System-wide external storages have no real owner so the current user is
used as owner. However when running cron.php there is no current user,
so no expiry can be done.

This fix adds an user argument to the expire() function to tell for
which user to expire files. This information is anyway always available
now through the expire command job.

* Move version expire setupFS into the expire function

* Add comment about not tearing down in version Storage::expire()

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
@MorrisJobke
MorrisJobke force-pushed the ext-storage-expireversions branch from 4592d35 to 5dbb32f Compare March 10, 2017 21:58
@MorrisJobke

Copy link
Copy Markdown
Member

I rebased to have this tested against latest master

@rullzer

rullzer commented Mar 16, 2017

Copy link
Copy Markdown
Member

@MorrisJobke tests seem ok!

@MorrisJobke

Copy link
Copy Markdown
Member

Expiry still works 👍

@MorrisJobke
MorrisJobke merged commit cc077e6 into master Mar 17, 2017
@MorrisJobke
MorrisJobke deleted the ext-storage-expireversions branch March 17, 2017 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants