diff --git a/rbf/cursor.go b/rbf/cursor.go index 56822341e..60727743d 100644 --- a/rbf/cursor.go +++ b/rbf/cursor.go @@ -9,6 +9,7 @@ import ( "unsafe" "github.com/pilosa/pilosa/v2/roaring" + "github.com/pkg/errors" ) const ( @@ -155,9 +156,10 @@ func (c *Cursor) Add(v uint64) (changed bool, err error) { return false, nil case ContainerTypeBitmap: // Exit if bit set in bitmap container. - pgno, bm, err := cell.GetBitmap(c.tx) + pgno, bm, err := c.tx.GetBitmap(&cell) + if err != nil { - return false, err + return false, errors.Wrap(err, "cursor.Add") } a := cloneArray64(bm) @@ -234,9 +236,9 @@ func (c *Cursor) Remove(v uint64) (changed bool, err error) { } return true, c.putLeafCell(leafArgs{Key: cell.Key, Type: ContainerTypeRLE, N: len(runs), Data: fromInterval16(runs)}) case ContainerTypeBitmap: - pgno, bm, err := cell.GetBitmap(c.tx) + pgno, bm, err := c.tx.GetBitmap(&cell) if err != nil { - return false, err + return false, errors.Wrap(err, "cursor.add") } a := cloneArray64(bm) if a[lo/64]&(1<