Comments (4)
@googolgl hi, Please provide more information.
0、nutsDB version
1、which platform? e.g. OS X 10.13.6, Ubuntu 16.04
2、the complete code which you execute
Then I will check this question. thanks.
from nutsdb.
- github.com/xujiajun/nutsdb v0.4.1-0.20190405142137-dad030248b51
- Ubuntu 18.04.2 LTS; Linux Comp 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux; Intel(R) Pentium(R) CPU G2120 @ 3.10GHz; Mem 8096328
import "github.com/xujiajun/nutsdb"
type ndb struct {
db *nutsdb.DB
}
func initNutsdb() *nutsdb.DB {
opt := nutsdb.DefaultOptions
opt.Dir = "./nutsdb"
opt.SegmentSize = 8388608
opt.EntryIdxMode = nutsdb.HintKeyAndRAMIdxMode
opt.SyncEnable = false
opt.RWMode = nutsdb.FileIO
opt.NodeNum = 1
db, err := nutsdb.Open(opt)
if err != nil {
log.Fatal(err)
}
return db
}
in main function
n = ndb{
db: initNutsdb(),
}
from nutsdb.
@googolgl ,hi ,
I used your code (fixed some syntax mistakes) to run on ubuntu 18.04.2 LTS multiple times, but no errors occurred.
The code that runs is as follows:
package main
import "github.com/xujiajun/nutsdb"
func initNutsdb() *nutsdb.DB {
opt := nutsdb.DefaultOptions
opt.Dir = "./nutsdb_data"
opt.SegmentSize = 8388608
opt.EntryIdxMode = nutsdb.HintKeyAndRAMIdxMode
opt.SyncEnable = false
opt.RWMode = nutsdb.FileIO
opt.NodeNum = 1
db, err := nutsdb.Open(opt)
if err != nil {
panic(err)
}
return db
}
func main() {
initNutsdb()
}
BTW the latest version of nutsDB is 0.4.0 ,why github.com/xujiajun/nutsdb v0.4.1-xxx
?
I suggest you reinstall the nutsDB and try again.
from nutsdb.
it's my mistake
thanks
from nutsdb.
Related Issues (20)
- [BUG] error concurrent map writes HOT 8
- The tx.IterateBuckets method only iterated through the buckets once. HOT 4
- Get All example doesn't work HOT 2
- bug: can't insert multiple values at list HOT 1
- There may be something wrong with the `mmap` implementation
- Suggestions for commercialisation of the project(项目商业化建议)
- Proposal for documents project of NutsDB which based Docusaurus HOT 7
- Implement `Watch` API
- pref: Optimize the memory usage of SortedSet HOT 5
- 关于 10000 个 websocket 处理数据使用 nutsdb 缓存状态
- 服务器在数据读写过程中异常断电,是否有概率出现crc error? HOT 5
- The GetAll function only return values not contians keys HOT 2
- Storing values larger than 2 GB
- 在window下 Merge报错 HOT 3
- pref: pre-computed to reduce the overhead of computing the crc of the flags of entry. HOT 4
- nil pointer dereference panic HOT 4
- Possible memory leak when opening a new DB by the commit buffer
- Goroutine leak in when closing a DB
- 迁移数据到 1.0
- IDGenerator 没有在重新打开数据库的时候正确恢复状态
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nutsdb.