Improve Find Query for Index Ranges (make clause for Deflector Indices more explicit, etc.) #21592
+56
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If you have an index that has messages with a timestamp
1970-01-01 00:00
but that has already been rotated (index_range
hasbegin == 0
andend != 0
), it was still found as a valid index for certain operations by the former, now changed query clause that was supposed to only find deflector indices (begin == 0
andend == 0
).This PR fixes the query clause.
I added more tests to reflect those situations.
Also, if you query with a
![Screenshot 2025-02-11 at 13 20 09](https://private-user-images.githubusercontent.com/1190735/411987211-317c9e24-cc0b-43ab-8acd-9e67a3541ece.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzAzMDIsIm5iZiI6MTczOTUzMDAwMiwicGF0aCI6Ii8xMTkwNzM1LzQxMTk4NzIxMS0zMTdjOWUyNC1jYzBiLTQzYWItOGFjZC05ZTY3YTM1NDFlY2UucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTA0NjQyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDYwNGZlYTE4NzJiOGVkNTc1YmY4NzExMzBkNTA4MDk1NTdjMjMxM2ExZDRhNDNmNTIwNjVkNDVlM2I1M2UwZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.uKDLtDvpr75_sHpNtsS38XWx7YHW7FHDPYHu87lH88w)
end
time beforebegin
time now, an exception is thrown because of an invalid time range.Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: