Skip to content

Allow chunk GC mtime tolerance for unfinished part chunks - #24691

Merged
PVince81 merged 1 commit into
masterfrom
fixchunkttl
May 18, 2016
Merged

PVince81 merged 1 commit into
masterfrom
fixchunkttl

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

Whenever part chunks are written, every fwrite in the write loop will
reset the mtime to the current mtime. Only at the end will the touch()
operation set the mtime to now + ttl, in the future.

However the GC code is expecting that every chunk with mtime < now are
old and must be deleted. This causes the GC to sometimes delete part
chunks in which the write loop is slow.

To fix this, a tolerance value is added in the GC code to allow for
more time before a part chunk gets deleted.

Fixes #24653
Steps here: #24653 (comment)

Please review @icewind1991 @Marginal @MorrisJobke @nickvergessen @schiesbn @rullzer

Whenever part chunks are written, every fwrite in the write loop will
reset the mtime to the current mtime. Only at the end will the touch()
operation set the mtime to now + ttl, in the future.

However the GC code is expecting that every chunk with mtime < now are
old and must be deleted. This causes the GC to sometimes delete part
chunks in which the write loop is slow.

To fix this, a tolerance value is added in the GC code to allow for
more time before a part chunk gets deleted.
@PVince81 PVince81 added this to the 9.1-current milestone May 18, 2016
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @DeepDiver1975, @LukasReschke and @MorrisJobke to be potential reviewers

@PVince81

Copy link
Copy Markdown
Contributor Author

stable9: #24676
stable8.2: #24692
stable8.1: #24693
stable8: #24694

@rullzer

rullzer commented May 18, 2016

Copy link
Copy Markdown
Contributor

👍

@icewind1991

Copy link
Copy Markdown
Contributor

👍 looks good

@Marginal

Copy link
Copy Markdown

👍

@lock

lock Bot commented Aug 5, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chunk file disappears from cache during sync

6 participants