You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/develop/data-types/timeseries/configuration.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,11 +177,27 @@ When a compaction policy is defined, compaction rules will be created automatica
177
177
178
178
_key_agg_dur_aln_ where _key_ is the key of the source time series, _agg_ is the aggregator (in uppercase), _dur_ is the bucket duration in milliseconds, and _aln_ is the time bucket alignment in milliseconds. Example: `key_SUM_60000_1000`.
179
179
180
-
**Examples**
180
+
#### Example rules
181
181
182
182
-`max:1M:1h` - Aggregate using `max` over one-minute windows and retain the last hour
183
183
-`twa:1d:0m:360M` - Aggregate daily [06:00 .. 06:00) using `twa`; no expiration
184
184
185
+
#### Example
186
+
187
+
Setting a compaction policy composed of 5 compaction rules
redis> CONFIG SET ts-compaction-policy max:1m:1h;min:10s:5d:10d;last:5M:10m;avg:2h:10d;avg:3d:100d
199
+
```
200
+
185
201
### DUPLICATE_POLICY / ts-duplicate-policy
186
202
187
203
The default policy for handling insertion ([`TS.ADD`]({{< relref "/commands/ts.add/" >}}) and [`TS.MADD`]({{< relref "/commands/ts.madd/" >}})) of multiple samples with identical timestamps, with one of the following values:
@@ -199,32 +215,14 @@ The default value is applied to each new time series upon its creation.
199
215
200
216
Type: string
201
217
202
-
Default: `BLOCK`
203
-
204
218
**Precedence order**
205
219
206
220
Since the duplication policy can be provided at different levels, the actual precedence of the used policy will be:
1. Key-level policy, as set with [`TS.CREATE`]({{< relref "/commands/ts.create/" >}})'s and [`TS.ALTER`]({{< relref "/commands/ts.alter/" >}})'s `DUPLICATE_POLICY` optional argument.
210
224
1. The `ts-duplicate-policy` configuration parameter.
211
-
1. The default policy.
212
-
213
-
#### Example
214
-
215
-
Setting a compaction policy composed of 5 compaction rules
0 commit comments