Apply suggestions from code review

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
Alessandro (Ale) Segala 2024-01-31 11:52:15 -08:00 committed by GitHub
parent 017bb6214c
commit f26884509c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -5,10 +5,13 @@ linkTitle: "SQLite"
description: Detailed information on the SQLite name resolution component
---
The SQLite name resolution component offers an alternative to mDNS for running Dapr on single-node environments and for local development scenarios. Dapr sidecars part of the cluster store their information in a SQLite database on the local machine.
As an alternative to mDNS, the SQLite name resolution component can be used for running Dapr on single-node environments and for local development scenarios. Dapr sidecars that are part of the cluster store their information in a SQLite database on the local machine.
> This component is optimized to be used in scenarios where all Dapr instances are running on the same physical machine, where the database is accessed through the same, locally-mounted disk.
> Using the SQLite nameresolver with a database file accessed over the network (including via SMB/NFS) can lead to issues including data corruption, and is not supported.
{{% alert title="Note" color="primary" %}}
This component is optimized to be used in scenarios where all Dapr instances are running on the same physical machine, where the database is accessed through the same, locally-mounted disk.
Using the SQLite nameresolver with a database file accessed over the network (including via SMB/NFS) can lead to issues such as data corruption, and is **not supported**.
{{% /alert %}}
## Configuration format
@ -33,12 +36,12 @@ spec:
## Spec configuration fields
When using the SQLite component as name resolver, the `spec.nameResolution.configuration` dictionary contains these options
When using the SQLite component as name resolver, the `spec.nameResolution.configuration` dictionary contains these options:
| Field | Required | Type | Details | Examples |
|--------------|:--------:|-----:|:---------|----------|
| `connectionString` | Y | `string` | The connection string for the SQLite database. Normally, this is the path to a file on disk, relative to the current working directory, or absolute. | `"nr.db"` (relative to the working directory), `"/home/user/.dapr/nr.db"` |
| `updateInterval` | N | [Go duration](https://pkg.go.dev/time#ParseDuration) (as a `string`) | Interval for active Dapr sidecars to update their status in the database.<br>Must be at least 1s greater than `timeout`. Values with fractions of seconds are truncated (e.g. `1500ms` becomes `1s`). Default: `5s` | `"2s"` |
| `updateInterval` | N | [Go duration](https://pkg.go.dev/time#ParseDuration) (as a `string`) | Interval for active Dapr sidecars to update their status in the database.<br>Must be at least 1s greater than `timeout`. Values with fractions of seconds are truncated (for example, `1500ms` becomes `1s`). Default: `5s` | `"2s"` |
| `timeout` | N | [Go duration](https://pkg.go.dev/time#ParseDuration) (as a `string`).<br>Must be at least 1s. | Timeout for operations on the database. Integers are interpreted as number of seconds. Defaults to `1s` | `"2s"`, `2` |
| `tableName` | N | `string` | Name of the table where the data is stored. Defaults to `hosts`. | `"hosts"` |
| `metadataTableName` | N | `string` | Name of the table used by Dapr to store metadata for the component. Defaults to `metadata`. | `"metadata"` |