-
Notifications
You must be signed in to change notification settings - Fork 25.5k
LogsDB data migration integration testing #112710
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
LogsDB data migration integration testing #112710
Conversation
Here we test reindexing logsdb indices, creating and restoring snapshots. Note that logsdb uses synthetic source and restoring source only snapshots fails due to missing _source.
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
assertOK(client.performRequest(reindexRequest)); | ||
assertDataStreamBackingIndexMode("standard", 0, "standard-apache-kafka"); | ||
assertThat( | ||
entityAsMap(client.performRequest(new Request("POST", "/standard-apache-kafka/_count"))).get("count"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check that documents look correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you exactly mean when saying "look correct"? I think it is not up to thins kind of test including that they match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this is not an ideal place to test reindex operation itself but AFAIK there are currently no tests for this. Do we have an item for that? I was thinking that such a simple document should be identical even with synthetic _source and therefore we could get at least an initial test for that behavior.
putTemplate(client, "standard-template", STANDARD_TEMPLATE); | ||
createDataStream(client, "standard-apache-kafka"); | ||
|
||
// Index some documents in LogsDB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the test is testStandardToLogsDBReindex
but the test is doing the opposite - it reindexes form logsdb to standard.
putTemplate(client, "standard-template", STANDARD_TEMPLATE); | ||
createDataStream(client, "standard-apache-kafka"); | ||
|
||
// Index some documents in LogsDB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in standard
Matchers.equalTo(10) | ||
); | ||
|
||
// Reindex LogsDB data stream into a standard data stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
standard into logsdb
mountRequest.setJsonEntity("{\"index\": \"" + index + "\",\"renamed_index\": \"" + restoreIndex + "\"}"); | ||
assertOK(client.performRequest(mountRequest)); | ||
|
||
assertThat( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same - can we check documents?
@lkts this was not ready for review yet...I pushed to see CI results. |
@salvatore-campagna lol sorry about that. Can you mark it as draft then? |
I usually wait at least for a round of CI to be green or, at least to see if there is anything wrong and then I ask for a review selecting reviewers. I do this to avoid wasting people time reviewing something that is not ready yet. I rarely use draft PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Here we test reindexing logsdb indices, creating and restoring snapshots. Note that logsdb uses synthetic source and restoring source only snapshots fails due to missing _source.
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Here we test reindexing logsdb indices, creating and restoring snapshots. Note that logsdb uses synthetic source and restoring source only snapshots fails due to missing _source. (cherry picked from commit f7880ae)
Here we test reindexing logsdb indices, creating and restoring snapshots. Note that logsdb uses synthetic source and restoring source-only snapshots fails due to missing _source.
Resolves #109803