Comments (1)
The typical approach is to let the data manager remember whether it has already joined the transaction or not.
Of course, this requires a different handling of the data manager. In your code above, you (ab)use the transaction itself to manage the data manager. Typically, the data manager exists independent of the transaction (it may e.g. be managed in a thread local "variable"). The application interacts primarily with the data manager (transactions are relevant only at very few points) and the data manager decides when to join the transaction (and knows if it has already done this). If the data manager has joined the transaction, it will get informed when the transaction is aborted/committed (which implicitly creates a new transaction). It can then reset its joined
state).
from transaction.
Related Issues (20)
- 3.0.1: pytest warnings HOT 8
- 3.0.1: setuptools build_sphinx command fails HOT 11
- 3.0.1: transaction not sphinx 4.0.x ready? HOT 5
- Print the stack when a resource manager joins a transaction HOT 4
- Question: Nested transaction.manager HOT 2
- Add support for QA tooling? HOT 3
- 3.0.1: sphinx warnings `reference target not found` HOT 1
- Transactions with multiprocessing HOT 2
- No status to indicate aborted transaction. HOT 7
- Reach 100% coverage HOT 1
- DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working HOT 2
- 'ThreadTransactionManager' object has no attribute '_retryable' HOT 1
- Support abort hooks (symmetrically to commit hooks) HOT 1
- It's very easy to create reference cycles that require the GC to clean up HOT 9
- Docs: Confusion between resource and data managers HOT 1
- Still possible to join aborted and doomed transactions
- RTD integration broken HOT 2
- Remove legacy functionality from ITransactionDeprecated
- transaction 3.0 breaks afterCommitHooks HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transaction.