Merge pull request #1814 from jaffee/disable-syncer-if-replicaN-1

disable anti-entropy if not using replication [performance]
This commit is contained in:
Matthew Jaffee 2019-01-08 08:28:11 -06:00 committed by GitHub
commit 1726e24aa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -428,7 +428,7 @@ func (s *Server) SyncData() error {
}
func (s *Server) monitorAntiEntropy() {
if s.antiEntropyInterval == 0 {
if s.antiEntropyInterval == 0 || s.cluster.ReplicaN <= 1 {
return // anti entropy disabled
}
s.cluster.initializeAntiEntropy()