Commit a1cb4f0b authored by metacertain's avatar metacertain Committed by GitHub

fix: only in neighborhood replication (#2237)

parent 67a4212e
...@@ -322,6 +322,10 @@ func (ps *PushSync) pushToClosest(ctx context.Context, ch swarm.Chunk, retryAllo ...@@ -322,6 +322,10 @@ func (ps *PushSync) pushToClosest(ctx context.Context, ch swarm.Chunk, retryAllo
return nil, ErrWarmup return nil, ErrWarmup
} }
if !ps.topologyDriver.IsWithinDepth(ch.Address()) {
return nil, ErrNoPush
}
count := 0 count := 0
// Push the chunk to some peers in the neighborhood in parallel for replication. // Push the chunk to some peers in the neighborhood in parallel for replication.
// Any errors here should NOT impact the rest of the handler. // Any errors here should NOT impact the rest of the handler.
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment