Move diff from nspcc master and support branches #28
1 changed files with 5 additions and 1 deletions
|
@ -65,8 +65,12 @@ func (e *StorageEngine) put(prm PutPrm) (PutRes, error) {
|
|||
|
||||
e.iterateOverSortedShards(addr, func(ind int, sh hashedShard) (stop bool) {
|
||||
e.mtx.RLock()
|
||||
pool := e.shardPools[sh.ID().String()]
|
||||
pool, ok := e.shardPools[sh.ID().String()]
|
||||
e.mtx.RUnlock()
|
||||
if !ok {
|
||||
// Shard was concurrently removed, skip.
|
||||
return false
|
||||
}
|
||||
|
||||
putDone, exists := e.putToShard(sh, ind, pool, addr, prm.obj)
|
||||
finished = putDone || exists
|
||||
|
|
Loading…
Add table
Reference in a new issue