(key string)
| 119 | } |
| 120 | |
| 121 | func (dm *DMap) deleteKey(key string) error { |
| 122 | hkey := partitions.HKey(dm.name, key) |
| 123 | part := dm.getPartitionByHKey(hkey, partitions.PRIMARY) |
| 124 | f, err := dm.loadOrCreateFragment(part) |
| 125 | if err != nil { |
| 126 | return err |
| 127 | } |
| 128 | |
| 129 | f.Lock() |
| 130 | defer f.Unlock() |
| 131 | |
| 132 | // Check the HKey before trying to delete it. |
| 133 | if !f.storage.Check(hkey) { |
| 134 | // DeleteMisses is the number of deletions reqs for missing keys |
| 135 | DeleteMisses.Increase(1) |
| 136 | return nil |
| 137 | } |
| 138 | |
| 139 | return dm.deleteOnCluster(hkey, key, f) |
| 140 | } |
| 141 | |
| 142 | func (dm *DMap) deleteKeys(ctx context.Context, keys ...string) (int, error) { |
| 143 | members := make(map[discovery.Member][]string) |
no test coverage detected