diff --git a/contributing/ARCHITECTURE.md b/contributing/ARCHITECTURE.md index 4ede39296f..fae4a02128 100644 --- a/contributing/ARCHITECTURE.md +++ b/contributing/ARCHITECTURE.md @@ -16,7 +16,7 @@ projects, backends, repos, secrets, and gateways. The Python API consists of the low-level and high-level Python API. The low-level Python API is a Python wrapper around the server's HTTP API. It's available as `dstack.api.server`. The high-level API provides a more convenient interface to -work with `dstack` programatically. It's available as `dstack.api`. The `dstack` CLI is implemented on top of the +work with `dstack` programmatically. It's available as `dstack.api`. The `dstack` CLI is implemented on top of the high-level API. When the server provisions a cloud instance for a run, it launches a Docker image with the runner inside the image. The diff --git a/contributing/BACKENDS.md b/contributing/BACKENDS.md index 1b7bf2f623..5a0b12bb6d 100644 --- a/contributing/BACKENDS.md +++ b/contributing/BACKENDS.md @@ -233,9 +233,9 @@ To support it, `dstack` expects the following from the cloud provider: The examples of container-based backends include: `kubernetes`, `vastai`, etc. -Note: There are two types of compute in dstack: +Note: There are two types of computing in dstack: -When `dstack` provisions a VM, it launches there `dstack-runner`. +When `dstack` provisions a VM, it launches their `dstack-runner`. [//]: # (TODO: Elaborate on what dstack-runner is and how it works) diff --git a/contributing/LOCKING.md b/contributing/LOCKING.md index d070b2b210..e79973bd4d 100644 --- a/contributing/LOCKING.md +++ b/contributing/LOCKING.md @@ -34,7 +34,7 @@ allow independent locking of different resources. ## Postgres locking Postgres resource locking is implemented via standard SELECT FOR UPDATE. -SQLAlchemy provides `.with_for_update()` that has not effect if SELECT FOR UPDATE is not supported as in SQLite. +SQLAlchemy provides `.with_for_update()` that has no effect if SELECT FOR UPDATE is not supported as in SQLite. There are few places that rely on advisory locks as when generating unique resource names. @@ -85,4 +85,4 @@ the changes may not be visible to another transaction that acquired the lock and **Don't use joinedload when selecting .with_for_update()** -In fact, using `joinedload` and `.with_for_update()` will trigger and error because `joinedload` produces OUTER LEFT JOIN that cannot be used with SELECT FOR UPDATE. A regular `.join()` can be used to lock related resources but it may lead to no rows if there is no row to join. Usually, you'd select with `selectinload` or first select with `.with_for_update()` without loading related attributes and then re-selecting with `joinedload` without `.with_for_update()`. +In fact, using `joinedload` and `.with_for_update()` will trigger an error because `joinedload` produces OUTER LEFT JOIN that cannot be used with SELECT FOR UPDATE. A regular `.join()` can be used to lock related resources but it may lead to no rows if there is no row to join. Usually, you'd select with `selectinload` or first select with `.with_for_update()` without loading related attributes and then re-selecting with `joinedload` without `.with_for_update()`.