summaryrefslogtreecommitdiff
path: root/src/blockchain_db
Commit message (Collapse)AuthorAgeFilesLines
* Add destructor for readtxnsHoward Chu2016-03-162-10/+21
| | | | Only if we created the readtxn. Was missing cleanups from exceptions before.
* Small cleanupsHoward Chu2016-03-151-24/+28
| | | | | Only one return and TXN_POSTFIX_RDONLY() per function Only log rtxn_start if the rtxn wasn't already active
* More for 92dd4ec6d6251b15954002e72a7c7faa5059a3abHoward Chu2016-03-151-22/+22
| | | | Make sure we stop the right txn too
* Merge pull request #723Riccardo Spagni2016-03-142-21/+21
|\ | | | | | | 2abdb2c avoid some val copies (Howard Chu)
| * avoid some val copiesHoward Chu2016-03-142-21/+21
| |
* | Hack for read/write txn mixupHoward Chu2016-03-142-42/+31
|/ | | | | save the thread ID of the writer thread so we don't try to use the writetxn from reader threads
* Merge pull request #712Riccardo Spagni2016-03-113-5/+6
|\ | | | | | | | | 66c2fc7 Need to link boost::chrono in more places now (Howard Chu) b937a2c Use boost::thread instead of std::thread (Howard Chu)
| * Need to link boost::chrono in more places nowHoward Chu2016-03-111-0/+1
| |
| * Use boost::thread instead of std::threadHoward Chu2016-03-112-5/+5
| | | | | | | | and all other associated IPC
* | More for bdec7cbHoward Chu2016-03-091-14/+14
|/ | | | More uses of db error helper
* Merge pull request #700Riccardo Spagni2016-03-051-33/+34
|\ | | | | | | | | | | bdec7cb BlockchainLMDB: Use DB error helper consistently (warptangent) c5932eb BlockchainLMDB: Add DB error to exception (warptangent) a49c355 Blockchain: Omit verbose time stats messages by default (warptangent)
| * BlockchainLMDB: Use DB error helper consistentlywarptangent2016-03-031-28/+27
| |
| * BlockchainLMDB: Add DB error to exceptionwarptangent2016-03-031-5/+7
| |
* | Merge pull request #698Riccardo Spagni2016-03-051-57/+14
|\ \ | | | | | | | | | ee7a8b8 Get rid of lmdb_cur (Howard Chu)
| * | Get rid of lmdb_curHoward Chu2016-03-031-57/+14
| |/ | | | | | | We don't need it now with per-txn cursors.
* / More for df239428c0f43e2664f2be273996a734ca12c686Howard Chu2016-03-031-0/+6
|/ | | | Let ARMv7 work again
* Make partial revert consistentwarptangent2016-03-011-1/+1
| | | | | | | If user-defined comparator is used, subdb shouldn't be opened with MDB_INTEGERKEY. TODO: Again, this will be added back with future schema updates.
* Revert part of 7db89ed2eee2ce31f039783323d665fe7c24d441warptangent2016-02-291-2/+14
| | | | | | For now, so existing databases work. TODO: add these back with future schema updates.
* BlockchainLMDB: Add height and db error to exceptionwarptangent2016-02-291-1/+1
|
* Merge pull request #686Riccardo Spagni2016-02-296-185/+340
|\ | | | | | | | | | | | | | | 7db89ed ARMv7: fix unaligned accesses (Howard Chu) 5a07cef Wrap some more actions in a larger read txn (Howard Chu) 8cc7a36 read txn/cursor stuff (Howard Chu) 86a7f2b core: check whether an update is needed straight away (moneromooo-monero) ea5fa5e core: print "update needed" hard fork notifications in red (moneromooo-monero)
| * ARMv7: fix unaligned accessesHoward Chu2016-02-251-20/+15
| | | | | | | | And cleanup some key comparators
| * read txn/cursor stuffHoward Chu2016-02-236-165/+325
| | | | | | | | Could wrap more later.
* | db_bdb: add missing include for std::condition_variablemoneromooo-monero2016-02-201-0/+1
| |
* | BlockchainBDB: Check if hard fork subdbs need resetwarptangent2016-02-181-1/+50
| | | | | | | | See f7e337e6254c1c4115a8430964a6f6b54305b3ae for LMDB equivalent.
* | BlockchainBDB: Support blockchain_import --drop-hard-fork commandwarptangent2016-02-181-3/+35
|/ | | | See c657e772c4efbfee8ff698883f1532a38117a70a for LMDB equivalent.
* Use MDB_PREV_MULTIPLEHoward Chu2016-02-171-11/+40
| | | | in get_global_output_indices
* Fixup after lmdb master resyncHoward Chu2016-02-171-6/+6
|
* Shutup about VERSION 0Howard Chu2016-02-172-2/+6
|
* Use cursor in get_output_keyHoward Chu2016-02-171-1/+2
|
* Use MDB_APPEND mode where possibleHoward Chu2016-02-171-5/+9
| | | | | | | | | When keys are contiguous and monotonically increasing, this gets denser page utilization (doesn't leave padding in page splits). Can't be used for keys that are inserted in random order (e.g. hashes) In total this only saves around 1.5% of space compared to original DB code. The previous patch accounted for 0.8% savings on its own; the blocks tables just aren't that big.
* Use cursors in write txnsHoward Chu2016-02-172-22/+100
| | | | | Saves a bit of seek overhead. LMDB frees them automatically in txn_(commit|abort) so they need no cleanup.
* Keep a running blocksize countHoward Chu2016-02-172-0/+15
| | | | | Used in batch size estimation, avoids rereading already processed blocks during import
* Win32 import batchsize tweaksHoward Chu2016-02-171-3/+6
| | | | | Reduce frequency of resizes: bump minimum increase from 128MB to 512MB Use a bigger safety margin at small batch sizes
* Merge pull request #657Riccardo Spagni2016-02-132-12/+50
|\ | | | | | | | | | | | | 1995923 BlockchainLMDB: Deal with DB exceptions at block level with particularity (warptangent) c16cc20 BlockchainLMDB: Add sanity check for inconsistent state (warptangent) 9118d0a BlockchainLMDB: Call destructor on allocated txn if setup fails (warptangent) f5581c3 BlockchainLMDB: Replace remaining txn pointer NULLs with nullptr (warptangent)
| * BlockchainLMDB: Deal with DB exceptions at block level with particularitywarptangent2016-02-132-2/+21
| | | | | | | | | | | | | | | | Add another DB error exception type to distinguish failed txn setup from general use of txn. This keeps the error handling flow the same as before the block-level txn setup changes that moved control up a layer to BlockchainDB.
| * BlockchainLMDB: Add sanity check for inconsistent statewarptangent2016-02-131-2/+13
| | | | | | | | | | This hasn't been known to occur in block-level txn abort, but throw exception if it does.
| * BlockchainLMDB: Call destructor on allocated txn if setup failswarptangent2016-02-131-0/+8
| |
| * BlockchainLMDB: Replace remaining txn pointer NULLs with nullptrwarptangent2016-02-131-9/+9
| | | | | | | | For consistency.
* | blockchain_db: pass hard fork object as a simple pointermoneromooo-monero2016-02-082-2/+2
|/
* Move HardFork DB update to BlockchainDB::add_block()warptangent2016-02-081-0/+1
| | | | | | | Ensures the database is consistent. Also simplifes blockchain_import in that verify mode off has less to work around.
* Make HardFork object available to BlockchainDB and derived DB implementationswarptangent2016-02-084-0/+16
| | | | | | This will later allow the HardFork object's DB update functions to be called when the DB transaction that persists across block add/remove is open.
* BlockchainDB/LMDB: Refactor block-scope DB txn handling for add blockwarptangent2016-02-082-20/+10
| | | | Move block-scope txn start and stop from BlockchainLMDB to BlockchainDB.
* BlockchainDB/LMDB/BDB: Extract DB txn functions for block add/removewarptangent2016-02-085-0/+65
|
* BlockchainLMDB: Allow two HardFork functions to update DB during block addwarptangent2016-02-081-4/+4
| | | | Note that this doesn't yet cause them to be called during block add.
* BlockchainLMDB: extract txn macros used during block add/removewarptangent2016-02-081-0/+26
|
* fake_core: Check if hard fork subdbs need reset at startwarptangent2016-02-081-2/+8
|
* blockchain_import: Add --drop-hard-fork commandwarptangent2016-02-085-0/+21
|
* berkeleydb: fix delete/free mismatchmoneromooo-monero2016-02-031-2/+2
| | | | | Despite being C++, the stats object is allocated by the underlying C layer using malloc(3).
* BlockchainBDB: Continue when tx has no outputswarptangent2016-01-281-3/+5
| | | | See 24b66243c2767726ea4b279fcf447c7cd82c13e5
* BlockchainBDB: When removing, find amount output index fast by starting at endwarptangent2016-01-281-10/+33
| | | | | | | | | This improves blockchain reorganization time by allowing one of the more expensive DB lookups when popping a block to not have to seek through a long dup list in the "output_amounts" db. This is most noticeable for HDDs. See ffcf6bdb95abe2dab37d5f8d9acc134fdc6b4d36