-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Rdb_transaction_impl::get_trx safe to call from other threads (#…
…1512) Summary: - Introduce Rdb_transaction_impl::m_rdb_tx_mutex to protect writes to m_rocksdb_tx[USER_TABLE] from the query thread and reads from other threads. - To protect query thread writes, add critical sections to begin_rdb_tx and release_tx methods. - Make get_rdb_trx lock this mutex before returning the RocksDB transaction pointer and introduce unlock_rdb_trx method to unlock this mutex. - Call the above methods in Rdb_trx_info_aggregator::process_tran. Move unrelated code out of this critical section. Pull Request resolved: #1512 Differential Revision: D68311552 fbshipit-source-id: b87811f26a4f99af4dfc240b755ad931f90022d2
- Loading branch information
1 parent
e8a4209
commit c6e4b9f
Showing
5 changed files
with
130 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters