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

[CCR] Refactor ChunksCoordinator to continuously look for changes in leader shard #30898

Closed

Conversation

martijnvg
Copy link
Member

Make ChunksCoordinator in full control of following leader shard:

  • A single ChunksCoordinator is now in charge of following a shard and
    keeps on coordinating until the persistent task has been stopped. Whereas
    before a ChunksCoordinator's job was to process a finite amount of chunks
    and then a new ChunksCoordinator instance would process the next chunks.
  • Instead of consuming the chunks queue and waiting for all workers to
    complete, another background thread will continuously and chunks to the
    queue, so that the workers never run out of chunks to process if the
    leader shard has unprocessed write operations.
  • Renamed ChunkProcessor to ChunkWorker.

Relates to #30086

@martijnvg martijnvg added review :Distributed/CCR Issues around the Cross Cluster State Replication features labels May 28, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

* A single ChunksCoordinator is now in charge of following a shard and
keeps on coordinating until the persistent task has been stopped. Whereas
before a ChunksCoordinator's job was to process a finite amount of chunks
and then a new ChunksCoordinator instance would process the next chunks.
* Instead of consuming the chunks queue and waiting for all workers to
complete, another background thread will continuously and chunks to the
queue, so that the workers never run out of chunks to process if the
leader shard has unprocessed write operations.

Relates to elastic#30086
@martijnvg martijnvg force-pushed the background_chunks_update_task branch from 1868897 to 4e84a95 Compare June 5, 2018 16:00
@martijnvg martijnvg added WIP and removed review labels Jun 6, 2018
@martijnvg martijnvg force-pushed the background_chunks_update_task branch from add7759 to b378c4a Compare June 6, 2018 18:39
@martijnvg martijnvg added review and removed WIP labels Jun 7, 2018
@martijnvg
Copy link
Member Author

I've been running the benchmark (http logs) and with this change the follow index caught almost immediately after indexing has been completed. Whereas before it could take up between 5 and 10 minutes before the follow index had all the changes from the leader index.

I'll continue to test with the other new ccr benchmarks.

@martijnvg
Copy link
Member Author

I also tested with both pmc and geopoints benchmarks and in both cases after the benchmark data was indexed in the leader index, the follower index had all the documents within seconds.

@martijnvg
Copy link
Member Author

Superseded by: #31581

@martijnvg martijnvg closed this Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/CCR Issues around the Cross Cluster State Replication features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants