// deleteOnCluster is not a thread-safe function
deleteOnCluster is not a thread-safe function
// deleteOnCluster is not a thread - safe function
func (dm *DMap) deleteOnCluster(hkey uint64, key string, f *fragment) error {
	owners := dm.s.primary.PartitionOwnersByHKey(hkey)
	if len(owners) == 0 {
		panic("partition owners list cannot be empty")
	}
	err := dm.deleteFromPreviousOwners(key, owners)
	if err != nil {
		return err
	}
	if dm.s.config.ReplicaCount != 0 {
		err := dm.deleteBackupOnCluster(hkey, key)
		if err != nil {
			return err
		}
	}
	err = f.storage.Delete(hkey)
	if err != nil {
		return err
	}
	DeleteHits.Increase(1)
	return nil
}
func ( dm * DMap ) deleteOnCluster ( hkey uint64 , key string , f * fragment ) error { owners := dm . s . primary . PartitionOwnersByHKey ( hkey ) if len ( owners ) == 0 { panic ( " " ) } err := dm . deleteFromPreviousOwners ( key , owners ) if err != nil { return err } if dm . s . config . ReplicaCount != 0 { err := dm . deleteBackupOnCluster ( hkey , key ) if err != nil { return err } } err = f . storage . Delete ( hkey ) if err != nil { return err } DeleteHits . Increase ( 1 ) return nil }
deleteOnCluster is not a thread-safe function
deleteOnCluster is not a thread - safe function
// DeleteHits is the number of deletion reqs resulting in an item being removed.