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

TSM: Fix ShouldCompactCache without WAL #9972

Merged
merged 2 commits into from
Jun 14, 2018
Merged

TSM: Fix ShouldCompactCache without WAL #9972

merged 2 commits into from
Jun 14, 2018

Conversation

jacobmarble
Copy link
Member

@jacobmarble jacobmarble commented Jun 13, 2018

When WAL is disabled, snapshot compaction never happens due to CacheFlushWriteColdDuration is exceeded, only when CacheFlushMemorySizeThreshold is exceeded.

This is a problem for quiet clusters that pull from Kafka, because Kafka has it's own retention policy; if Kafka cleans up before influxdb snapshots, and then influxdb terminates, then the cached data is lost.

This change depends on Cache.LastWriteTime rather than WAL.LastWriteTime, which are nearly identical anyway, because Engine.WritePoints calls Cache.WriteMulti just before WAL.WriteMulti.

@ghost ghost assigned jacobmarble Jun 13, 2018
@ghost ghost added the review label Jun 13, 2018
@ghost ghost added the review label Jun 14, 2018
@jacobmarble jacobmarble merged commit 440457b into master Jun 14, 2018
@ghost ghost removed the review label Jun 14, 2018
@jacobmarble jacobmarble deleted the jgm-snapshot branch June 14, 2018 00:50
@e-dard e-dard mentioned this pull request Jun 25, 2018
10 tasks
jacobmarble added a commit that referenced this pull request Jun 26, 2018
TSM: Fix ShouldCompactCache without WAL
jacobmarble added a commit that referenced this pull request Jun 27, 2018
TSM: Fix ShouldCompactCache without WAL
jacobmarble added a commit that referenced this pull request Jun 27, 2018
TSM: Fix ShouldCompactCache without WAL
jacobmarble added a commit that referenced this pull request Jun 27, 2018
TSM: Fix ShouldCompactCache without WAL
jacobmarble added a commit that referenced this pull request Jun 27, 2018
TSM: Fix ShouldCompactCache without WAL
jacobmarble added a commit that referenced this pull request Jun 27, 2018
TSM: Fix ShouldCompactCache without WAL
jacobmarble added a commit that referenced this pull request Jun 27, 2018
TSM: Fix ShouldCompactCache without WAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants