-
Notifications
You must be signed in to change notification settings - Fork 1.5k
page ... already freed #574
Comments
Can you give me some more details about your OS & application? |
Sorry for the delay. Operating System: Debian GNU/Linux 8 (Jessie) App Now this app works on two sites. We work with Ruckus controller and 50 WiFi access points. It's the concept app, but I'm thinking to use BoltDB as the main database solution in future. What is the best way to create an index with BoltDB? I saw github.com/asdine/storm and github.com/tidwall/buntdb implementations. The first one is the copy to another bucket solution. Thank you. |
@k0mrade re: indexes, I typically use a separate bucket to store the index. For example, if you have a bucket of If you need non-unique indexes you can use the index bucket to point a value to a subbucket where there are a list of keys to point to. Depending on your cardinality of data you can also embed the index in the original bucket. For example, if you know you'll only have a small number of users per account you can embed a list of user IDs in your |
@k0mrade Yep what @benbjohnson said is exactly what has been done in Storm. Using buckets as indexes to other buckets is a very easy solution and works very well. I tried to implement a Btree but the encoding and decoding part is way too slow. The BoltDB buckets already do the job for you as you have a O(1) time complexity on index access out of the box for unique indexes.
If you need non-unique indexes, create a sub bucket with IDs as keys and nothing as the value:
Very easy to implement. Hope that helps |
Hi, catched the error
Check returns
bolt check db.back.db > 1.txt
The text was updated successfully, but these errors were encountered: