Skip to content

Commit

Permalink
Update language around consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
databyjp committed Sep 27, 2024
1 parent 8757c41 commit 980dbe3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ This allows you to tune your multi vector search to balance the target vectors i

For details, see [multi target vector search](/developers/weaviate/search/multi-vector).

## Tenant statuses changed
## Tenant states changed

Tenant [activity status](/developers/weaviate/concepts/data#tenant-status) is used to manage resource usage.

Expand Down
10 changes: 9 additions & 1 deletion developers/weaviate/concepts/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Multi-tenancy is especially useful when you want to store data for multiple cust
Deleting a tenant deletes the associated shard. As a result, deleting a tenant also deletes all of its objects.
:::

### Tenant status
### Tenant states

:::info Multi-tenancy availability
- Tenant activity status setting added in `v1.21`
Expand Down Expand Up @@ -250,6 +250,14 @@ For more details on managing tenants, see [Multi-tenancy operations](../manage-d
In `v1.26`, the `HOT` status was renamed to `ACTIVE` and the `COLD` status was renamed to `INACTIVE`.
:::

:::info Tenant state propagation
A tenant state change may take some time to propagate across a cluster, especially a multi-node cluster.

<br/>

For example, data may not be immediately available after reactivating an offloaded tenant. Similarly, data may not be immediately unavailable after offloading a tenant. This is because the [tenant states are eventually consistent](../concepts/replication-architecture/consistency.md#tenant-states-and-data-objects), and the change must be propagated to all nodes in the cluster.
:::

#### Offloaded tenants

:::info Added in `v1.26.0`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ Depending on the desired tradeoff between consistency and speed, below are three
* `ONE` / `ALL` => fast write and slow read (optimized for write)
* `ALL` / `ONE` => slow write and fast read (optimized for read)

### Tenant states and data objects

Each tenant in a multi-tenant collection has a configurable [tenant state](../../starter-guides/managing-resources/tenant-states.mdx), which determines the availability and location of the tenant's data. The tenant state can be set to `active`, `inactive`, or `offloaded`.

An `active` tenant's data should be available for queries and updates, while `inactive` or `offloaded` tenants are not.

However, there can be a delay between the time a tenant state is set, and when the tenant's data reflects the (declarative) tenant state. This delay is due to the tenant state information being eventually consistent in the cluster.

As a result, a tenant's data may be available for queries and updates for a period of time even if the tenant state is set to `inactive` or `offloaded`. Conversely, a tenant's data may not be available for queries and updates for a period of time even if the tenant state is set to `active`.

<!-- Q for Loic: Is there something a user could to to trigger read repairs or such to speed up the process? -->

## Repairs

import RepairIntro from '/_includes/configuration/consistency-repair-intro.mdx';
Expand Down
4 changes: 4 additions & 0 deletions developers/weaviate/manage-data/tenant-states.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ There are three tenant states: `Active`, `Inactive` and `Offloaded`.
| Inactive | **No** | Warm | Warm | Warm | Fast |Tenant is locally stored but not available for use |
| Offloaded | **No** | Cold | Cold | Cold | Slow |Tenant is stored in cloud storage and not available for use |

:::tip Tenant state and consistency
Tenant states are eventually consistent. [Read more](/developers/weaviate/concepts/replication-architecture/consistency#tenant-states-and-data-objects)
:::

### Active

An `Active` tenant is available for queries and CRUD operations. Depending on the [vector index type](/developers/weaviate/starter-guides/managing-resources#vector-index-types) it uses either **hot** or **warm** resources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Multi-tenant collections enable you to efficiently manage isolated subsets of da

A tenant status management strategy can help you to balance cost and performance. Here's why. An active tenant with an HNSW index uses *hot* resources, which are the most expensive. At the other end of the spectrum, an offloaded tenant uses *cold* resources, which are the least expensive.

:::info Tenant state propagation
A tenant state change may take some time to propagate across a cluster, especially a multi-node cluster.

<br/>

For example, data may not be immediately available after reactivating an offloaded tenant. Similarly, data may not be immediately unavailable after offloading a tenant. This is because the [tenant states are eventually consistent](../../concepts/replication-architecture/consistency.md#tenant-states-and-data-objects), and the change must be propagated to all nodes in the cluster.
:::

### Tenant states and resource usage

*Hot* tenants can be deactivated to *warm* storage to reduce memory usage, and any tenant can be offloaded to *cold* storage to reduce memory and disk usage. Conversely, any tenant can be reactivated when needed.
Expand Down

0 comments on commit 980dbe3

Please sign in to comment.