eosio / chainbase Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bytemaster/chainbase
Snapshot of Last Open Source version of Chainbase from Steem
License: MIT License
This project forked from bytemaster/chainbase
Snapshot of Last Open Source version of Chainbase from Steem
License: MIT License
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?
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.