diff options
author | Howard Chu <hyc@symas.com> | 2016-03-14 18:26:15 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-03-14 20:19:46 +0000 |
commit | 92dd4ec6d6251b15954002e72a7c7faa5059a3ab (patch) | |
tree | 4fd930ab1b3be26396f5c6cec0bfbe11401d8e7f /src/blockchain_db/lmdb/db_lmdb.h | |
parent | change to LMDB as default, even on 32-bit and ARM (diff) | |
download | monero-92dd4ec6d6251b15954002e72a7c7faa5059a3ab.tar.xz |
Hack for read/write txn mixup
save the thread ID of the writer thread so we don't try to use
the writetxn from reader threads
Diffstat (limited to '')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h index e58643efa..0b5797e97 100644 --- a/src/blockchain_db/lmdb/db_lmdb.h +++ b/src/blockchain_db/lmdb/db_lmdb.h @@ -272,7 +272,7 @@ public: virtual void block_txn_start(bool readonly); virtual void block_txn_stop(); virtual void block_txn_abort(); - virtual bool block_rtxn_start() const; + virtual bool block_rtxn_start(MDB_txn **mtxn, mdb_txn_cursors **mcur) const; virtual void block_rtxn_stop() const; virtual void pop_block(block& blk, std::vector<transaction>& txs); @@ -388,6 +388,7 @@ private: std::string m_folder; mdb_txn_safe* m_write_txn; // may point to either a short-lived txn or a batch txn mdb_txn_safe* m_write_batch_txn; // persist batch txn outside of BlockchainLMDB + boost::thread::id m_writer; bool m_batch_transactions; // support for batch transactions bool m_batch_active; // whether batch transaction is in progress |