From 14b4712806eacf779323fb09c68c74c2b1f9839d Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 27 Jun 2023 11:48:25 +0100 Subject: [PATCH 1/6] Adds ETCD v2 Signed-off-by: joshvanl --- daprdocs/content/en/reference/api/actors_api.md | 2 +- .../supported-state-stores/setup-etcd.md | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/reference/api/actors_api.md b/daprdocs/content/en/reference/api/actors_api.md index 5e4bbd579c1..e2c9920a10d 100644 --- a/daprdocs/content/en/reference/api/actors_api.md +++ b/daprdocs/content/en/reference/api/actors_api.md @@ -77,7 +77,7 @@ Persists the change to the state for an actor as a multi-item transaction. #### TTL -With the [`ActorStateTTL` feature enabled]]({{< ref +With the [`ActorStateTTL` feature enabled]({{< ref "support-preview-features.md" >}}), actor clients can set the `ttlInSeconds` field in the transaction metadata to have the state expire after that many seconds. If the `ttlInSeconds` field is not set, the state will not expire. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index 35834d1c4ce..25def61705b 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -18,7 +18,9 @@ metadata: name: spec: type: state.etcd - version: v1 + # Supports v1 and v2. Users should always use v2 by default. There is no + # migration path from v1 to v2, see `versioning` below. + version: v2 metadata: - name: endpoints value: # Required. Example: 192.168.0.1:2379,192.168.0.2:2379,192.168.0.3:2379 @@ -38,6 +40,16 @@ spec: The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). {{% /alert %}} + +### Versioning + +Dapr has 2 versions of the Etcd state store component: `v1` and `v2`. + +`v1` and `v2` have the same metadata fields, however `v1` will cause data inconsistencies in apps when using [Actor TTLs]({{< ref "actors_api.md#ttl" >}}) from Dapr `v1.12`. +Users should always use `v2` over `v1` as `v1` is deprecated. +`v1` and `v2` are incompatible and there is no data migration path for `v1` to `v2` on an existing active Etcd cluster and `keyPrefixPath`. +If you are using `v1`, you should continue to use `v1` until you create a new Etcd cluster or use a different `keyPrefixPath`, then use `v2`. + ## Spec metadata fields | Field | Required | Details | Example | From ea499d301f669b604f1909eb71ddeafb3173149b Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Wed, 28 Jun 2023 09:46:22 +0100 Subject: [PATCH 2/6] Update daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Josh van Leeuwen --- .../components-reference/supported-state-stores/setup-etcd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index 25def61705b..bf10fb146ff 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -45,7 +45,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr Dapr has 2 versions of the Etcd state store component: `v1` and `v2`. -`v1` and `v2` have the same metadata fields, however `v1` will cause data inconsistencies in apps when using [Actor TTLs]({{< ref "actors_api.md#ttl" >}}) from Dapr `v1.12`. +While `v1` and `v2` have the same metadata fields, `v1` causes data inconsistencies in apps when using [Actor TTLs]({{< ref "actors_api.md#ttl" >}}) from Dapr v1.12. Users should always use `v2` over `v1` as `v1` is deprecated. `v1` and `v2` are incompatible and there is no data migration path for `v1` to `v2` on an existing active Etcd cluster and `keyPrefixPath`. If you are using `v1`, you should continue to use `v1` until you create a new Etcd cluster or use a different `keyPrefixPath`, then use `v2`. From 8434534f3551f056f7cc874e8fb0642835945d9a Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Wed, 28 Jun 2023 09:46:35 +0100 Subject: [PATCH 3/6] Update daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Josh van Leeuwen --- .../components-reference/supported-state-stores/setup-etcd.md | 1 - 1 file changed, 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index bf10fb146ff..be1ac128999 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -46,7 +46,6 @@ The above example uses secrets as plain strings. It is recommended to use a secr Dapr has 2 versions of the Etcd state store component: `v1` and `v2`. While `v1` and `v2` have the same metadata fields, `v1` causes data inconsistencies in apps when using [Actor TTLs]({{< ref "actors_api.md#ttl" >}}) from Dapr v1.12. -Users should always use `v2` over `v1` as `v1` is deprecated. `v1` and `v2` are incompatible and there is no data migration path for `v1` to `v2` on an existing active Etcd cluster and `keyPrefixPath`. If you are using `v1`, you should continue to use `v1` until you create a new Etcd cluster or use a different `keyPrefixPath`, then use `v2`. From e3abfa85ae1fb88a0bd8222cc3465672f6443f27 Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Wed, 28 Jun 2023 09:46:47 +0100 Subject: [PATCH 4/6] Update daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Josh van Leeuwen --- .../components-reference/supported-state-stores/setup-etcd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index be1ac128999..a3026d74943 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -43,7 +43,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr ### Versioning -Dapr has 2 versions of the Etcd state store component: `v1` and `v2`. +Dapr has 2 versions of the Etcd state store component: `v1` and `v2`. It is recommended to use `v2`, as `v1` is deprecated. While `v1` and `v2` have the same metadata fields, `v1` causes data inconsistencies in apps when using [Actor TTLs]({{< ref "actors_api.md#ttl" >}}) from Dapr v1.12. `v1` and `v2` are incompatible and there is no data migration path for `v1` to `v2` on an existing active Etcd cluster and `keyPrefixPath`. From efb3468d8882f7aa581800df83bd6c91a0657ef1 Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Wed, 28 Jun 2023 09:46:56 +0100 Subject: [PATCH 5/6] Update daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Josh van Leeuwen --- .../components-reference/supported-state-stores/setup-etcd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index a3026d74943..f700af0eb9d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -46,7 +46,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr Dapr has 2 versions of the Etcd state store component: `v1` and `v2`. It is recommended to use `v2`, as `v1` is deprecated. While `v1` and `v2` have the same metadata fields, `v1` causes data inconsistencies in apps when using [Actor TTLs]({{< ref "actors_api.md#ttl" >}}) from Dapr v1.12. -`v1` and `v2` are incompatible and there is no data migration path for `v1` to `v2` on an existing active Etcd cluster and `keyPrefixPath`. +`v1` and `v2` are incompatible with no data migration path for `v1` to `v2` on an existing active Etcd cluster and `keyPrefixPath`. If you are using `v1`, you should continue to use `v1` until you create a new Etcd cluster or use a different `keyPrefixPath`, then use `v2`. ## Spec metadata fields From 4a58c18e2ac04a1e68ae3aa090b486dc07222949 Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Wed, 28 Jun 2023 09:47:02 +0100 Subject: [PATCH 6/6] Update daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Josh van Leeuwen --- .../components-reference/supported-state-stores/setup-etcd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index f700af0eb9d..63ee61ac2d0 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -47,7 +47,7 @@ Dapr has 2 versions of the Etcd state store component: `v1` and `v2`. It is reco While `v1` and `v2` have the same metadata fields, `v1` causes data inconsistencies in apps when using [Actor TTLs]({{< ref "actors_api.md#ttl" >}}) from Dapr v1.12. `v1` and `v2` are incompatible with no data migration path for `v1` to `v2` on an existing active Etcd cluster and `keyPrefixPath`. -If you are using `v1`, you should continue to use `v1` until you create a new Etcd cluster or use a different `keyPrefixPath`, then use `v2`. +If you are using `v1`, you should continue to use `v1` until you create a new Etcd cluster or use a different `keyPrefixPath`. ## Spec metadata fields