Comments (4)
List of locks could potentially be dangerous and cause deadlock scenarios, in my opinion.
Classic deadlock scenario is:
# Thread A
Lock X
Lock Y
Unlock Y
Unlock X
# Thread B
Lock X
Lock Y
Unlock X
Unlock Y
If locks are not obtained and released in the exact same order in all code paths, you risk the chance of a deadlock scenario. It's much safer to just have one single lock and ensure it is always released in the face of an exception or return from your code path (In this case a workflow success or failure).
from orquesta.
Small question, would it make sense to support a list of locks rather than a single lock? Could people want to acquire locks on different resources with different timeouts but still want the executing workflow to depend one or both of them?
from orquesta.
Fair enough, I was coming from a specific use case where I needed a lock for a group of servers and another lock for individual server within that group when I asked if it made sense to support a list of locks.
If Orquesta would suffer from the same deadlock/livelock issues as OS threads, then I agree it's a dangerous feature to allow.
from orquesta.
This is a good point on deadlock. I think for the time being we will keep this simple. The engine should detect that a lock is already acquired and will not allow additional lock requests in subworkflow(s) since that is possible.
from orquesta.
Related Issues (20)
- Workflow stuck in running state
- Exception running workflow - 'ValueError: malformed node or string: <_ast.BinOp object at 0x7f80d29946d8>' HOT 3
- Workflow join is not triggered on complete for failed task(s) HOT 8
- The ujson 2.0.x doesn't compatible with Orquesta HOT 1
- Retries using with-items runs a retry even on objects that succeeded as well HOT 5
- Join failure within nested workflows can cause Parent workflow to run indefinitely.
- Join ALL and conditional branches conflict? HOT 6
- Incomplete next staged concurrent task with items if last running nested item fails.
- KeyValue DataStore does not load in Workflow HOT 2
- 'Inspect the workflow spec' and 'Instantiate the workflow conductor' take too long HOT 7
- Workflow join is not properly working if one step fails HOT 4
- Disable action notify triggers when action is executed under workflow context HOT 3
- Naming a workflow task "get_task" causes "'TaskSpec' object is not callable" error
- Valid YAQL in With Items Input Fails HOT 8
- JOIN all with condition HOT 2
- Investigate using `rustworkx` instead of `networkx` HOT 1
- Workflow stuck with concurrency value of 0.
- Orquesta workflow inquiries responder user ID not found
- task with join: all starts without waiting for all the previous task completed when there is a loop
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 orquesta.