This commit is contained in:
Todd Gruben 2022-02-25 15:47:30 -06:00
parent e64767a886
commit ecaaddcf71
2 changed files with 7 additions and 1 deletions

View file

@ -8300,7 +8300,13 @@ func DeleteRows(ctx context.Context, src *Row, idx *Index, shard uint64) (bool,
var deletedRowID uint64
var commitor Commitor = &NopCommitor{}
var err error
if len(src.segments) == 0 { //nothing to remove
return false, nil
}
columns := src.segments[0].data //should only be one segment
if columns.Count() == 0 {
return false, nil
}
if idx.Keys() {
//store columns in exits field ToBeDelete row commited

View file

@ -618,7 +618,7 @@ func (c *Container) setBitmap(bitmap []uint64) {
}
}
if len(bitmap) != 1024 {
panic("illegal bitmap length")
panic(fmt.Sprintf("illegal bitmap length %v", len(bitmap)))
}
c.pointer, c.len, c.cap = (*uint16)(unsafe.Pointer(&bitmap[0])), bitmapN, bitmapN
c.flags &^= flagPristine