GithubHelp home page GithubHelp logo

eosio / chainbase Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bytemaster/chainbase

80.0 80.0 77.0 2.17 MB

Snapshot of Last Open Source version of Chainbase from Steem

License: MIT License

CMake 2.23% C++ 97.77%

chainbase's People

Contributors

arhag avatar b1bart avatar brianjohnson5972 avatar bytemaster avatar duncand0nuts avatar heifner avatar jgiszczak avatar kesar avatar larryk85 avatar moskvanaft avatar nathanielhourt avatar ndcgundlach avatar spoonincode avatar swatanabe-b1 avatar tbfleming avatar theoreticalbts avatar xinyijun 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

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  avatar  avatar  avatar  avatar

chainbase's Issues

add_index() does not use locking

I'm using chainbase in Chronicle project in concurrent mode: one process opens the database in read-write mode and is constantly updating it as state history data arrives. Then, multiple read-only processes read from the same shared memory.

I define CHAINBASE_CHECK_LOCKING globally.

I get the following error when read-only client opens the database and defines the indexes:

May 25 01:05:46 sthist chronicle-receiver[5523]: warn  2019-05-25T01:05:46.141 chronicle receiver_plugin.cpp:1201      plugin_initialize    ] 13 N5boost16exception_detail10clone_implINS0_19error_info_injectorISt11logic_errorEEEE: existing index for chronicle::received_block_object has an undo stack (revision range [-1, 23598015]) that is inconsistent with other indices in the database (revision range [23597735, 23597736]); corrupted database?
May 25 01:05:46 sthist chronicle-receiver[5523]: rethrow existing index for chronicle::received_block_object has an undo stack (revision range [-1, 23598015]) that is inconsistent with other indices in the database (revision range [23597735, 23597736]); corrupted database?:
May 25 01:05:46 sthist chronicle-receiver[5523]:     {"what":"existing index for chronicle::received_block_object has an undo stack (revision range [-1, 23598015]) that is inconsistent with other indices in the database (revision range [23597735, 23597736]); corrupted database?"}
May 25 01:05:46 sthist chronicle-receiver[5523]:     chronicle-recei  receiver_plugin.cpp:1201 plugin_initialize

so, there should be a global lock wrapping around add_index(). For now I will wrap the locks around calling add_index in my program, but I think it makes sense to protect it inside chainbase.

Test in branch v2.0.x always fails

The test in branch v2.0.x always fails, complaining database dirty flag set.

It looks like this is a problem that has been fixed on the master branch, but was forgotten on the branch v2.0.x.

I have made a pull request #67 to branch v2.0.x for this.

Considering that the branch v2.0.x is currently being tracked by multiple branches as submodules in EOSIO/eos, it is desired that we fix the test error and make the test pass.

Multiple processes may open the same database - HOW?

Your README states that multiple processes may open the same database. The first process has the database open in read-write mode, and I'm trying to start another process that would open the same database in read-only more.

The second process gets the exception that "database dirty flag set".

How could I do this?

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.