Skip to content

Commit

Permalink
Merge pull request #25 from stapelberg/no-pipeline-replication
Browse files Browse the repository at this point in the history
introduce ErrPipelineReplicationNotSupported for transports
  • Loading branch information
armon committed Jan 5, 2015
2 parents a522043 + 16e3575 commit 46d9b08
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ const (
var (
// ErrLogNotFound indicates a given log entry is not available.
ErrLogNotFound = errors.New("log not found")

// ErrPipelineReplicationNotSupported can be returned by the transport to
// signal that pipeline replication is not supported in general, and that
// no error message should be produced.
ErrPipelineReplicationNotSupported = errors.New("pipeline replication not supported")
)

type followerReplication struct {
Expand Down Expand Up @@ -118,7 +123,9 @@ PIPELINE:
// is not able to gracefully recover from errors, and so we fall back
// to standard mode on failure.
if err := r.pipelineReplicate(s); err != nil {
r.logger.Printf("[ERR] raft: Failed to start pipeline replication to %s: %s", s.peer, err)
if err != ErrPipelineReplicationNotSupported {
r.logger.Printf("[ERR] raft: Failed to start pipeline replication to %s: %s", s.peer, err)
}
}
goto RPC
}
Expand Down

0 comments on commit 46d9b08

Please sign in to comment.