timshannon / badgerhold

BadgerHold is an embeddable NoSQL store for querying Go types built on Badger
MIT License
519 stars 51 forks source link

arm64 compatibility #90

Closed farhoud closed 1 year ago

farhoud commented 1 year ago

In android I am encountering this error :

while opening memtables error: while opening fid: 52 error: while updating skiplist error: mremap size mismatch: requested: 20 got: 134217728

The last Badger release is more arm64 friendly and fixes this issue.

I can make PR if you like.

timshannon commented 1 year ago

Looks like you closed your PR. Did you run into issues? I can try putting together a PR as well.

Thanks for reporting.

timshannon commented 1 year ago

Actually it looks like that PR you linked to is not for Badger at all.

This discussion appears to state that they don't actually support ARM for Badger: https://discuss.dgraph.io/t/error-mremap-size-mismatch-on-arm64/15333/8

It looks like generally BoltDB has better support for Arm than badger. It should be fairly easy to switch over to https://github.com/timshannon/bolthold

If you do find missing functionality between BadgerHold and BoltHold, open an issue, it can likely be added.

Thanks,

farhoud commented 1 year ago

sorry that PR was meant for my own fork.

the release note has mentioned there is a fix for arm64: https://github.com/dgraph-io/badger/releases/tag/v3.2103.3 and by updating the badger my issue was fixed. do you think it's possible to make go-datastore-hold on top of https://github.com/ipfs/go-datastore?

make the Hold backend agnostic?

I'm working on a mobile chat application with libp2p and I am at the point where need to either bring hold to go-datastore or do my own mapping. so you can count on my contribution.