Skip to content

index out of range #15

@k773

Description

@k773

Hello. Found a bug.
It doesn't appear every execution.

Stack trace:

panic: runtime error: index out of range [3030211] with length 3030211

goroutine 70 [running]:
github.com/kelindar/column.(*columnfloat64).Apply(0xc0004b6570, 0xc0c332ecc0)
        /root/go/golibs/src/github.com/kelindar/column/column_numbers.go:205 +0x1ad
github.com/kelindar/column.(*column).Apply(0xc0004b6660, 0xc0c332ecc0, 0x0)
        /root/go/golibs/src/github.com/kelindar/column/column.go:148 +0x5b
github.com/kelindar/column.(*Txn).commitUpdates.func1(0xc0c332ecc0)
        /root/go/golibs/src/github.com/kelindar/column/txn.go:445 +0x7e
github.com/kelindar/column/commit.(*Reader).Range(0xc0c332ecc0, 0xc000092780, 0xb8, 0xc0009077d8)
        /root/go/golibs/src/github.com/kelindar/column/commit/reader.go:219 +0x11e
github.com/kelindar/column.(*Txn).commitUpdates(0xc0c30fc6e0, 0xb8, 0xc006cdc000)
        /root/go/golibs/src/github.com/kelindar/column/txn.go:439 +0x14b
github.com/kelindar/column.(*Txn).commit.func2(0xc0000000b8, 0xc006cdc000, 0x100, 0x4800)
        /root/go/golibs/src/github.com/kelindar/column/txn.go:408 +0x1f0
github.com/kelindar/column.(*Txn).rangeWrite.func1(0xc0000000b8)
        /root/go/golibs/src/github.com/kelindar/column/txn_lock.go:71 +0x13b
github.com/kelindar/bitmap.Bitmap.Range(0xc0c3c2b2c0, 0x3, 0x4, 0xc000907a08)
        /root/go/golibs/src/github.com/kelindar/bitmap/range.go:28 +0xbc
github.com/kelindar/column.(*Txn).rangeWrite(0xc0c30fc6e0, 0xc000907a78)
        /root/go/golibs/src/github.com/kelindar/column/txn_lock.go:62 +0x7f
github.com/kelindar/column.(*Txn).commit(0xc0c30fc6e0)
        /root/go/golibs/src/github.com/kelindar/column/txn.go:402 +0x1a6
github.com/kelindar/column.(*Collection).Query(0xc0000b2000, 0xc09ba1fc38, 0x1485b00, 0x28)
        /root/go/golibs/src/github.com/kelindar/column/collection.go:264 +0xff

My code causing the issue:

e = d.Query(func(txn *column.Txn) (e error) {
	_ = txn.Range("col2", func(v column.Cursor) {
		v.SetFloat64(0)
	})
	return txn.Range("col1", func(v column.Cursor) {
		if a, h := someMap[v.String()]; h {
			v.SetFloat64At("col2", a[1].(float64))
			v.SetStringAt("col3", a[0].(string))
		}
	})
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions