CCoinsViewCache: separate read and write caches #4684

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2014_08_ccoins_write changing 4 files +88 −33
  1. laanwj commented at 12:03 PM on August 12, 2014: member

    Keep track of entries that are read-only or r/w in separate caches. This is an optimization that avoids writing back all accessed entries back to the database on a flush.

    Also makes the way clear for future optimizations such as putting a fixed limit on the size of the read cache, by using a different data structure for the read and write cache.

    I've tested this with a full reindex on testnet and mainnet, as well as checkblocks. I wonder how it will fare under the pulltester.

  2. Split CCoinsView::GetCoins into GetCoins and ModifyCoins
    Make intention more clear:
    
    - Call ModifyCoins if you intend to change the coins
    - Call GetCoins to get a const reference to the coins
    
    This can be used for dirty tracking later on.
    245606c28b
  3. CCoinsViewCache: separate read and write caches
    Keep track of entries that are read-only or r/w in separate
    caches. This is an optimization that avoids writing back all
    accessed entries back to the database on a flush.
    
    Also makes the way clear for future optimizations such as putting a
    fixed limit on the size of the read cache.
    9fd43c3334
  4. laanwj added the label Improvement on Aug 12, 2014
  5. laanwj added the label UTXO Db and Indexes on Aug 12, 2014
  6. BitcoinPullTester commented at 12:25 PM on August 12, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4684_9fd43c3334c201b1c3741ad6b5ef1b546bbe1c1c/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  7. laanwj commented at 3:17 PM on August 12, 2014: member

    Closing for now, still needs some work

  8. laanwj closed this on Aug 12, 2014

  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me