Skip to content

Commit

Permalink
Add state diagram for compute
Browse files Browse the repository at this point in the history
Models a compute's lifetime.
  • Loading branch information
tristan957 committed Mar 20, 2024
1 parent 55c4ef4 commit 041b653
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions compute_tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,29 @@ compute_ctl -D /var/db/postgres/compute \
-b /usr/local/bin/postgres
```

## State Diagram

Computes can be in various states. Below is a diagram that details how a
compute moves between states.

```mermaid
%% https://mermaid.js.org/syntax/stateDiagram.html
stateDiagram-v2
[*] --> Empty : Compute spawned
Empty --> ConfigurationPending : Waiting for compute spec
ConfigurationPending --> Configuration : Received compute spec
Configuration --> Failed : Failed to configure the compute
Configuration --> Running : Compute has been configured
Empty --> Init : Compute spec is immediately available
Empty --> TerminationPending : Requested termination
Init --> Failed : Failed to start Postgres
Init --> Running : Started Postgres
Running --> TerminationPending : Requested termination
TerminationPending --> Terminated : Terminated compute
Failed --> [*] : Compute exited
Terminated --> [*] : Compute exited
```

## Tests

Cargo formatter:
Expand Down

1 comment on commit 041b653

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2786 tests run: 2641 passed, 1 failed, 144 skipped (full report)


Failures on Postgres 14

  • test_bulk_insert[neon-github-actions-selfhosted]: release
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_bulk_insert[neon-release-pg14-github-actions-selfhosted]"
Flaky tests (1)

Postgres 15

  • test_crafted_wal_end[last_wal_record_crossing_segment]: debug

Code coverage* (full report)

  • functions: 28.3% (7135 of 25210 functions)
  • lines: 46.9% (43715 of 93293 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
041b653 at 2024-03-20T23:18:34.044Z :recycle:

Please sign in to comment.