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

Backport ShardRecoveryHandlerrefactorings to 1.x #8570

Merged
merged 4 commits into from Nov 20, 2014
Merged

Commits on Nov 20, 2014

  1. Refactor shard recovery from anonymous class to ShardRecoveryHandler

    Previously the bulk of our shard recovery code was in a 300-line
    anonymous class in `RecoverySource`. This made it difficult to find and
    more difficult to read.
    
    This factors out that code into a `ShardRecoveryHandler` class, adding
    javadocs for each function and phase of the recovery, as well as
    comments explaining some of the more esoteric functions performed during
    recovery.
    
    It's hoped that this will help more people understand Elasticsearch's
    recovery procedure.
    
    No *major* functionality has changed, only typo corrections, some minor
    allocation improvements and logging clarification changes.
    
    Conflicts:
    	src/main/java/org/elasticsearch/indices/recovery/RecoverySource.java
    dakrone authored and s1monw committed Nov 20, 2014
    Copy the full SHA
    7829208 View commit details
    Browse the repository at this point in the history
  2. Mark ShardRecoveryShandler class as final

    dakrone authored and s1monw committed Nov 20, 2014
    Copy the full SHA
    87cdeb8 View commit details
    Browse the repository at this point in the history
  3. Test: CorruptedFileTest.testCorruptionOnNetworkLayer used node settin…

    …gs when creating an index
    
    Test used `indices.recovery.concurrent_streams` when creating an index but this is a node setting. Moved it to the node settings and added similar settings to speed up concurrent recoveries.
    
    Also fixed a misleading log message in ShardRecoveryHandler when logging a remove corruption
    bleskes authored and s1monw committed Nov 20, 2014
    Copy the full SHA
    2f758d2 View commit details
    Browse the repository at this point in the history
  4. [RECOVERY] Allow to cancle recovery sources when shards are closed

    Today recovery sources are not cancled if a shard is closed. The recovery target
    is already cancled when shards are closed but we should also cleanup and cancel
    the sources side since it holds on to shard locks / references until it's closed.
    s1monw committed Nov 20, 2014
    Copy the full SHA
    339e9dd View commit details
    Browse the repository at this point in the history