temporarily replace mermaid with PNG

This commit is contained in:
DanRoscigno 2023-01-12 11:03:40 -05:00
parent 8c40c4d79f
commit 69cdb838c5
2 changed files with 1 additions and 13 deletions

View File

@ -198,19 +198,7 @@ Each slot can be seen as an independent state machine with the following states:
Note that `allocated` slot can be in two different states: `granted` and `acquired`. The former is a transitional state, that actually should be short (from the instant when a slot is allocated to a query till the moment when the up-scaling procedure is run by any thread of that query).
```mermaid
stateDiagram-v2
direction LR
[*] --> free
free --> allocated: allocate
state allocated {
direction LR
[*] --> granted
granted --> acquired: acquire
acquired --> [*]
}
allocated --> free: release
```
![state diagram](@site/docs/en/development/images/concurrency.png)
API of `ConcurrencyControl` consists of the following functions:
1. Create a resource allocation for a query: `auto slots = ConcurrencyControl::instance().allocate(1, max_threads);`. It will allocate at least 1 and at most `max_threads` slots. Note that the first slot is granted immediately, but the remaining slots may be granted later. Thus limit is soft, because every query will obtain at least one thread.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB