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

Search Rollup and Live Data Feature: Base case (No overlapping data) #898

Conversation

ronnaksaxena
Copy link
Contributor

@ronnaksaxena ronnaksaxena commented Aug 18, 2023

Handles the use case of of searching rollup indices and live indices that have no overlapping data between them
Base Case: No data overlap between rollup indices and live data indices

noOverlap

Changes:

  • Previously an exception would be thrown in validate indices because it would try to find a matching rollup job for the live index
  • Now it only rewrites the search request for the rollup index and executes the live index shard search request separately

CheckList:

  • [x ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ronnaksaxena ronnaksaxena changed the title Base case Search Rollup and Live Data Feature: Base case (No overlapping data) Aug 18, 2023
@eirsep
Copy link
Member

eirsep commented Aug 23, 2023

what do you mean by "Ignore exception being thrown by not calling validate indices in live data indices" in description?

Copy link
Member

@eirsep eirsep left a comment

Choose a reason for hiding this comment

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

thanks for making these changes, @ronnaksaxena

Added a few comments.

ronnaksaxena and others added 7 commits August 23, 2023 10:05
Signed-off-by: Ronnak Saxena <[email protected]>
deleted response interceptor init from indexManagementPlugin

Signed-off-by: Ronnak Saxena <[email protected]>
deleted resonse interceptor from helper method

Signed-off-by: Ronnak Saxena <[email protected]>
Will add response interceptor logic in next PR

Signed-off-by: Ronnak Saxena <[email protected]>
uncommeneted rollup size check

Signed-off-by: Ronnak Saxena <[email protected]>
Comment on lines +95 to +101
val concreteRolledUpIndexNames = mutableListOf<String>()
for (indexName in concreteIndices) {
if (isRollupIndex(indexName, clusterService.state())) {
concreteRolledUpIndexNames.add(indexName)
}
}
val filteredConcreteIndices = concreteRolledUpIndexNames.toTypedArray()
Copy link
Member

Choose a reason for hiding this comment

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

When the shard is a rollup index, you do a filtering and keep only the rollup indexes in the request. What about the other path, when the shard is a live index, do you also need a filtering?

Comment on lines +1925 to +1930
var deleteResponse = client().makeRequest(
"POST",
"source_rollup_search/_delete_by_query",
mapOf("refresh" to "true"),
StringEntity("""{"query": {"match_all": {}}}""", ContentType.APPLICATION_JSON)
)
Copy link
Member

Choose a reason for hiding this comment

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

If all the data from source index gets deleted, then it seems to me you are just search the rollup index later instead of both indexes

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.

3 participants