rosedb
rosedb copied to clipboard
rose.Get panil
I think a nil check should be added
problem code:
func (it *item) Less(bi btree.Item) bool {
return bytes.Compare(it.key, bi.(*item).key) < 0
}
trace stack:
panic: interface conversion: btree.Item is nil, not *index.item
goroutine 45976651194 [running]:
github.com/rosedblabs/rosedb/v2/index.(*item).Less(0xc03a835ec0, {0x0, 0x0})
/data/go/pkg/mod/github.com/rosedblabs/rosedb/[email protected]/index/btree.go:31 +0xd5
github.com/google/btree.glob..func1({0x1a79740, 0xc03a835ec0}, {0x0, 0x0})
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:905 +0x49
github.com/google/btree.items[...].find.func1()
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:216 +0xa9
sort.Search(0x3b, 0xc00db4f268)
/data/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go1.20.5/src/sort/search.go:65 +0x65
github.com/google/btree.items[...].find(0x1a8b860, {0x1a79740, 0xc03a835ec0}, 0x19efb88)
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:215 +0x15b
github.com/google/btree.(*node[...]).get(0x1aa1e80, {0x1a79740, 0xc03a835ec0})
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:322 +0xdc
github.com/google/btree.(*node[...]).get(0x1aa1e80, {0x1a79740, 0xc03a835ec0})
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:326 +0x1f3
github.com/google/btree.(*node[...]).get(0x1aa1e80, {0x1a79740, 0xc03a835ec0})
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:326 +0x1f3
github.com/google/btree.(*BTreeG[...]).Get(0x1aa1bc0, {0x1a79740, 0xc03a835ec0})
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:824 +0x99
github.com/google/btree.(*BTree).Get(0xc018bd5860, {0x1a79740, 0xc03a835ec0})
/data/go/pkg/mod/github.com/google/[email protected]/btree_generic.go:977 +0x5a
github.com/rosedblabs/rosedb/v2/index.(*MemoryBTree).Get(0xc00501aec0, {0xc03adf5578, 0x12, 0x18})
/data/go/pkg/mod/github.com/rosedblabs/rosedb/[email protected]/index/btree.go:46 +0xe6
github.com/rosedblabs/rosedb/v2.(*Batch).Get(0xc0485fede0, {0xc03adf5578, 0x12, 0x18})
/data/go/pkg/mod/github.com/rosedblabs/rosedb/[email protected]/batch.go:207 +0x3b8
Thanks, how to reproduce the problem?
Thanks, how to reproduce the problem?
sorry, i don't know how to reproduce,I only encountered it in the prod environment, and I haven’t found the data scenario yet.
Thanks, how to reproduce the problem?
sorry, i don't know how to reproduce,I only encountered it in the prod environment, and I haven’t found the data scenario yet.
Thanks for your feedback. I will fix this by adding a nil check.
Thanks, how to reproduce the problem?
sorry, i don't know how to reproduce,I only encountered it in the prod environment, and I haven’t found the data scenario yet.
Thanks for your feedback. I will fix this by adding a nil check.
Is there an estimated repair time?
Thanks, how to reproduce the problem?
sorry, i don't know how to reproduce,I only encountered it in the prod environment, and I haven’t found the data scenario yet.
Thanks for your feedback. I will fix this by adding a nil check.
Is there an estimated repair time?
https://github.com/rosedblabs/rosedb/releases/tag/v2.3.5 Fixed in the latest release.
Thanks, how to reproduce the problem?
sorry, i don't know how to reproduce,I only encountered it in the prod environment, and I haven’t found the data scenario yet.
Thanks for your feedback. I will fix this by adding a nil check.
Is there an estimated repair time?
https://github.com/rosedblabs/rosedb/releases/tag/v2.3.5 Fixed in the latest release. When you have time, you can take a look at the scenarios in which this problem occurs.
Thanks, how to reproduce the problem?
sorry, i don't know how to reproduce,I only encountered it in the prod environment, and I haven’t found the data scenario yet.
Thanks for your feedback. I will fix this by adding a nil check.
Is there an estimated repair time?
https://github.com/rosedblabs/rosedb/releases/tag/v2.3.5 Fixed in the latest release.
Can you give me an example code to reproduce the problem?
Are you still having problems with this issue? @EternalHunters