Closed
Description
I was wondering why nutsdb
is so fast, so I did a quick review on your code, and there is no flush/sync call in the code, you should call it to ensure durability and update the benchmark. 💪
Also, the README should mention the byte endianness issue as well, and the isolation level is not clear.
Activity
xujiajun commentedon Mar 7, 2019
@damnever hi ,thanks your advises,
as man2 said about mmap : The file may not actually be updated until msync(2) or munmap(2) is called. Actually i called munmap in this code, so data will be updated.
if you can give me your pr to improve it, it will be better;)
BTW, about the README i will continue to improve.
damnever commentedon Mar 7, 2019
YES, but
nutsdb
declares to support ACID, so you should call it in eachCommit
, without it, the most important part aboutnutsdb
is wrong.damnever commentedon Mar 7, 2019
Also, the simple lock cannot fully guarantee the ACID.
xujiajun commentedon Mar 8, 2019
@damnever ,thanks :)
i have updated the README about transaction in the Caveats & Limitations,and i will rethink your advises , and i will continue to update the README, especially about the transaction.
damnever commentedon Mar 8, 2019
Still, it is a misleading README, you should remove the benchmark part and all other contents those declares
nutsdb
is faster than others, if you remove theirflush/fsync/fdatasync
part, they are fast too! And anyone can write a fast kvstore.As I mentioned before, you maybe understand the ACID properties, but you implement it wrong, and what is a
non-standard transaction
?As a self-learning project is ok, but DO NOT mislead others!
xujiajun commentedon Mar 8, 2019
@damnever thanks to review my README,i have updated the README about the benchmark part and about declares nutsdb is faster than others.
About a non-standard transaction or a standard transaction, i mean a transactional database like mysql that provides the ACID properties , i can call it a a standard transaction. If a database not completely including ACID properties,like redis ,i call it a non-standard transaction.
if have any question, Welcome to give me advises.
BTW, i never want to mislead others. if have any mistake about README or code etc. Welcome to submit issue and give me PR.
thanks again!
damnever commentedon Mar 8, 2019
I glad to see you make some changes.
From the context:
xujiajun commentedon Mar 11, 2019
@damnever hi, now the master branch of nutsdb has supports persistence , i have use sync function in my code to ensure durability and update the benchmark,
selected kvstore which is embedded, persistence and support transactions.
benchmark result:
visit https://github.com/xujiajun/nutsdb#benchmarks for detail.
damnever commentedon Mar 11, 2019
I didn't go into details, as your benchmark shows,
nutsdb
is the simplest and fastest, it suites for the small projects(with small values?).Here is a bit of advice, do some setup and clean up work for each benchmark case.
xujiajun commentedon Mar 11, 2019
@damnever thanks your advice,but i don't know what you mean about doing some setup and cleaning up work for each benchmark case. I have use
b.ResetTimer()
to reset timer for each benchmark case and remove data before the case begining.olekukonko commentedon Mar 11, 2019
@damnever I think you should be less ambiguous and clearly state the issues.
damnever commentedon Mar 12, 2019
Here is what I mean. :simple_smile:
xujiajun commentedon Mar 12, 2019
@damnever hi, if have no more advises about this issue, i will close it.
1 remaining item