Skip to content

Chunk time ranges are inclusive. #1576

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

Merged
merged 4 commits into from
Sep 28, 2019
Merged

Conversation

tomwilkie
Copy link
Contributor

Fixes #1522 "ChunkStoreRandom Flake".

I believe this was a real bug - queries that ended on exact day boundaries wouldn't query chunks which started on exact day boundaries.

@tomwilkie tomwilkie force-pushed the 1522-chunkstorerandom-flake branch from 1843e9e to b700996 Compare August 12, 2019 18:25
Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Have you tested that tablemanager still works as expected? ISTR the "If through ends on 00:00 of the day, don't include the upcoming day" check is important there.

@@ -602,8 +602,8 @@ func TestChunkStoreRandom(t *testing.T) {

// pick two random numbers and do a query
for i := 0; i < 100; i++ {
start := rand.Int63n(100 * chunkLen)
end := start + 1 + rand.Int63n((100*chunkLen)-start)
start := rand.Int63n(99 * chunkLen)
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we want this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the end of the list of chunks there are no more chunks. It simplifies the test logic below to ensuring we never query over the end of the list of chunks.

@tomwilkie
Copy link
Contributor Author

Have you tested that tablemanager still works as expected? ISTR the "If through ends on 00:00 of the day, don't include the upcoming day" check is important there.

Not specifically, but we've been running this for ~3 weeks and not found any problems.

@bboreham
Copy link
Contributor

Turns out I was thinking of a very similar line in PeriodicTableConfig.periodicTables() added here.

LGTM

@bboreham bboreham merged commit 7d13c2f into master Sep 28, 2019
@bboreham bboreham deleted the 1522-chunkstorerandom-flake branch September 28, 2019 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test flake in TestChunkStoreRandom
2 participants