-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent Lucene indexing operations on replicas, gated by an index set…
…ting (#1935) * Prevent Lucene indexing operations on replica This change prevents Lucene indexing operations from occurring on replicas, while still writing to the replica translog. Note that the change only affects indexing operations. The logic in IndexShard has been changed to only write to the translog when applying the indexing operation to a replica shard. To allow this, a new addIndexOperationToTranslog API is exposed on the Engine class, which InternalEngine implements using existing translog logic. This code change also refactors the existing indexing logic in InternalEngine into separate internal methods - one that parses the document and prepares the Index object, and another for error handling. Signed-off-by: Kartik Ganesh <[email protected]> * Added index setting for segment replication For now, this is a boolean final value that simply turns segment replication on/off. The logic in IndexShard has been updated to branch based on this value. Signed-off-by: Kartik Ganesh <[email protected]>
- Loading branch information
Showing
6 changed files
with
152 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters