A Multithreaded, Transaction-Based Locking Strategy for Containers
A Multithreaded, Transaction-Based Locking Strategy for Containers Bob Steagall CppCon 2020 K E W B C O M P U T I N GCopyright © 2020 Bob Steagall K E W B C O M P U T I N G Overview • Sharing a container timestamp ordering (STO) • Testing the STO-based solution • Summary CppCon 2020 - A Multi-threaded, Transaction-Based Locking Strategy for Containers 2Copyright © 2020 Bob Steagall K E W B C O M P U T I N G Writing multi-threaded applications is easier (?) than ever CppCon 2020 - A Multi-threaded, Transaction-Based Locking Strategy for Containers 3Copyright © 2020 Bob Steagall K E W B C O M P U T I N G0 码力 | 142 页 | 474.78 KB | 5 月前3Concurrency
LOCK GUARD EXAMPLE if (transaction.amount < account.balance) { account.balance -= transaction.amount; record(account, transaction); accept_transaction(transaction); } else { account -= overdraft_charge; record(account, overdraft_of(transaction)); notify_user(account, overdraft_message); reject_transaction(transaction); } Needs synchronization https://godbolt.org/z/YhdcjncYoCppCon LOCK GUARD EXAMPLE if (transaction.amount < account.balance) { account.balance -= transaction.amount; record(account, transaction); accept_transaction(transaction); } else { account0 码力 | 160 页 | 2.91 MB | 5 月前3TiDB v8.3 Documentation
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 119 4.1.2 TiDB transaction mechanisms · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 119 4.1.3 The · · · · · · · 456 4 4.8 Transaction · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 462 4.8.1 Transaction overview · · · · · · · · · · · · · · · · · · · · 466 4.8.3 Transaction Restraints· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 497 4.8.4 Handle Transaction Errors · · · · · · · · · · · · ·0 码力 | 6606 页 | 109.48 MB | 9 月前3TiDB v8.2 Documentation
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 116 4.1.2 TiDB transaction mechanisms · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 116 4.1.3 The · · · · · · · 453 4 4.8 Transaction · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 459 4.8.1 Transaction overview · · · · · · · · · · · · · · · · · · · · 463 4.8.3 Transaction Restraints· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 494 4.8.4 Handle Transaction Errors · · · · · · · · · · · · ·0 码力 | 6549 页 | 108.77 MB | 9 月前3TiDB v8.1 Documentation
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 116 4.1.2 TiDB transaction mechanisms · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 116 4.1.3 The · · · · · · · 453 4 4.8 Transaction · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 459 4.8.1 Transaction overview · · · · · · · · · · · · · · · · · · · · 463 4.8.3 Transaction Restraints· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 494 4.8.4 Handle Transaction Errors · · · · · · · · · · · · ·0 码力 | 6479 页 | 108.61 MB | 9 月前3TiDB v8.5 Documentation
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 146 4.1.2 TiDB transaction mechanisms · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 146 4.1.3 The · · · · · · · · · 547 4.9 Transaction · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 549 4.9.1 Transaction overview · · · · · · · · · · · · · · · · · · · · 552 4.9.3 Transaction Restraints· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 583 4.9.4 Handle Transaction Errors · · · · · · · · · · · · ·0 码力 | 6730 页 | 111.36 MB | 9 月前3TiDB v8.4 Documentation
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 141 4.1.2 TiDB transaction mechanisms · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 141 4.1.3 The · · · · · · · · · 542 4.9 Transaction · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 544 4.9.1 Transaction overview · · · · · · · · · · · · · · · · · · · · 547 4.9.3 Transaction Restraints· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 578 4.9.4 Handle Transaction Errors · · · · · · · · · · · · ·0 码力 | 6705 页 | 110.86 MB | 9 月前3TiDB 2.1.7
updates by default, thanks to two auto-retry mechanisms which blindly re-applied updates when a transaction conflicted. TiDB also supports a select ... for update statement which mostly, but not entirely called a timestamp oracle (TSO, for short) to allocate a monotonically increasing se- quence of transaction timestamps. Data is stored in Bigtable, a horizontally scalable key-value store, which offers atomic the state of the row, includ- ing whether that row is locked by a transaction, or a pointer to that row’s current version. A transaction be- gins by acquiring a start timestamp from the TSO. It then acquires0 码力 | 9 页 | 141.29 KB | 5 月前3CppCon 2021: Persistent Data Structures
line flushes and memory fences low by persisting only the transaction descriptor: ▶ Contains the information needed to execute a transaction ▶ Leveraged as redo logs verify consistency after a crash and synchronization using a helping scheme in conjunction with CAS ▶ A transaction will help complete another transaction if a conflict is detected ▶ The transaction status is updated from Active to either Committed or Begin Transaction End Transaction Persist Transaction More Operations ? Execute Data Structure Operation Operation Successful? Commit Transaction Abort Transaction Set Transaction Status0 码力 | 56 页 | 1.90 MB | 5 月前3Conda 23.7.x Documentation
specifying only r-essentials, specify r-base=3.5 r-essentials. • Feeling frustrated with “verifying transaction” and also feeling lucky? – Run conda config --set safety_checks disabled. • Getting strange mixtures extras: mirrordenver.fdcservers.net * updates: mirror.tzulo.com Resolving Dependencies --> Running transaction check ---> Package conda.x86_64 0:4.5.11-0 will be installed --> Finished Dependency Resolution =============================================== Installing: conda x86_64 4.5.11-0 conda 73 M Transaction Summary =============================================================================== Install0 码力 | 795 页 | 4.91 MB | 7 月前3
共 96 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10