public class ReplicateFromLeader extends Object
Constructor and Description |
---|
ReplicateFromLeader(CoreContainer cc,
String coreName) |
Modifier and Type | Method and Description |
---|---|
static String |
getCommitVersion(SolrCore solrCore) |
void |
startReplication(boolean switchTransactionLog)
Start a replication handler thread that will periodically pull indices from the shard leader
|
void |
stopReplication() |
public ReplicateFromLeader(CoreContainer cc, String coreName)
public void startReplication(boolean switchTransactionLog)
This is separate from the ReplicationHandler that listens at /replication, used for recovery and leader actions. It is simpler to discard the entire polling ReplicationHandler rather then worrying about disabling polling and correctly setting all of the leader bits if we need to reset.
TODO: It may be cleaner to extract the polling logic use that directly instead of creating what might be a fairly heavyweight instance here.
switchTransactionLog
- if true, ReplicationHandler will rotate the transaction log once
the replication is donepublic void stopReplication()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.