Code Monkey home page Code Monkey logo

nemo's Introduction

nemo

Build Status

A library that provide multiply data structure. Such as map, hash, list, set. We build these data structure base on rocksdb

Performance

We test the nemo library simply. We run set/get 100,000 times with a 13 bytes key and value.

CPU: 24 * Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz

1. nemo

set: 4.18 micros/op; 239,140 ops/s get : 1.12 micros/op; 894,398 ops/s

2. leveldb

set: 1.36 micros/op; 733,896 ops/s get: 0.93 micros/op; 1,072,282 ops/s

3. rocksdb

set: 3.85 micros/op; 259,599 ops/s get: 1.00 micros/op; 998,631 ops/s

TODO

nemo's People

Contributors

axlgrep avatar baotiao avatar catkang avatar fancy-rabbit avatar flabby avatar jacketwoo avatar kernelmaker avatar leviathan1995 avatar prcyangli avatar rocksjtu avatar wenduo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nemo's Issues

sometimes core dump triggered by null pointer reference in master branch.

dbnemo column family has a compact filter class(CompactionFilter) with a private pointer name db pointer to memo db instance.In constructor of CompactionFilter,pointer db is null.
After memo is opened,the pointer will be set .
However, if the pointer has not been set, compact function maybe excecute.
Then, in CompactionFilter method ShouldDrop call DBNemoImpl::GetVersionAndTS, there will be a null ptr reference of private member "db".

SRandom API may return the same member of the set if input argument "count" is positive

If k is set to zero,then the wile statement will be pass and idx_flag[0] will be set to 1;
If k is set to zero the second time, idx_flag[0] will be set to 2;
The first member of set will be return twice in the case above.
Further more , the biggest member will be returned with higher probability if the rand() function return the same value.
//......
int k = rand() % remain_card + 1;
int i = 0;
int cnt = 0; // the valid k-th number
while (i < card && cnt < k) {
if (idx_flag.find(i) == idx_flag.end()) {
cnt++;
}

            if (cnt == k) break;
            i++;
        }
        idx_flag[i]++;
        remain_card--;

muti thread dead lock may happen in special case

In multi keys operation like SUnion SInter ZUnion ZInter RpopLpush,
nemo code requests record lock with the input argument order.
For example,thread 1 locks on "Key1" then requests for "Key2",thread 2 locks on "Key2" requests for "Key1".Then dead lock occurs.
Thread mutex of record lock must be locked in the same order.

zset中过期数据如何被清理

zexpire接口看起来是只修改了meta中的ttl字段,member to score/score to member中的过期value如何在compcation中被清掉?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.