-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
shrink time window incorrectly with overlaped data block #23354
Comments
@foobar looking at this code, I think a better strategy to calculate the
This is pretty deep stuff though, it would need a lot of careful testing before merge. |
this looks good but seems it would make the same result as calling |
We are running influxdb 1.8 and have a single shard with 2TB TSM files. Recently some simple queries with 'ORDER BY TIME DESC' failed to return and hogged both cpu and memory resources.
I took time to investigate and found a possible bug when reading from overlapped data blocks, though following code has been there for around 6 years:
influxdb/tsdb/engine/tsm1/file_store.gen.go.tmpl
Lines 186 to 188 in d3be25b
it's supposed to shrink the window but actually is expanding the window.
If a block has a long time range and it overlaps with many blocks with small time range, the bug causes lots of blocks being merged. The merge operation is expensive and might cause the function to run for a couple of hours.
Please confirm if my understanding is correct and I can send a PR to fix it.
The text was updated successfully, but these errors were encountered: