lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.58k stars 178 forks source link

fix database flushing issue related to parallel read access to leveldb/sqlite #395

Closed kauffj closed 3 years ago

kauffj commented 3 years ago

idea / hope was that we could force flushing to happen when writes happen (or more frequently)

shyba commented 3 years ago

From my post on Slack:

Using @bvbfan branch block_info_fix:

sqlite> select hex(hash),status from block_info where height =849954;
8B59A67722E7038A944AE1AC81F26E8D82991ECF09FB51C4A0F4BD2271EFA281|189
48F6E69D8CC8D50B1264F321E4E1190142E68A81D979B01457CA409E0F52783F|157

Instead of 2 blocks with flag 157 we get the correct one at 157 and the forked at 189