-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
In the following code path
influxdb/tsdb/engine/tsm1/compact.go
Lines 706 to 716 in 22bec4f
| func (c *DefaultPlanner) findGenerations(skipInUse bool) tsmGenerations { | |
| c.mu.Lock() | |
| defer c.mu.Unlock() | |
| last := c.lastFindGenerations | |
| lastGen := c.lastGenerations | |
| if !last.IsZero() && c.FileStore.LastModified().Equal(last) { | |
| return lastGen | |
| } | |
We see a problem when skipInUse alternates between true and false which can cause invalid caching behavior.
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
findGenerationsgets called withskipInUseset to true- Data is returned and set in
last&lastGen findGenerationsis called withskipInUseset to falselastGenwill be returned due to cached data
Expected behaviour:
I would expect changing the input to invalidate the cache
Reactions are currently unavailable