forked from TrueCloudLab/frostfs-node
[#635] Use internal key type when deleting from badger wc
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>fix/574-cnt_ever_existed
parent
dc3bc08c07
commit
345a1a69a2
|
@ -173,7 +173,7 @@ func (c *cache) workerFlushSmall() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
c.deleteFromDB([]string{objectCore.AddressOf(obj).EncodeToString()})
|
c.deleteFromDB([]internalKey{addr2key(objectCore.AddressOf(obj))})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ func (c *cache) openStore(readOnly bool) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cache) deleteFromDB(keys []string) []string {
|
func (c *cache) deleteFromDB(keys []internalKey) []internalKey {
|
||||||
if len(keys) == 0 {
|
if len(keys) == 0 {
|
||||||
return keys
|
return keys
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ func (c *cache) deleteFromDB(keys []string) []string {
|
||||||
|
|
||||||
var errorIndex int
|
var errorIndex int
|
||||||
for errorIndex = range keys {
|
for errorIndex = range keys {
|
||||||
if err := wb.Delete([]byte(keys[errorIndex])); err != nil {
|
if err := wb.Delete(keys[errorIndex][:]); err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue