As of RedisTimeseries >= 1.4 You can now add samples to a time series where the time of the sample is older than the newest sample in the series. Bundled with that, we now have a policy that will define handling of duplicate samples, and that needs to be supported on the client via the arguments [DUPLICATE_POLICY policy] on TS.CREATE and via [ON_DUPLICATE policy] on TS.ADD. The following are the possible policies:
BLOCK - an error will occur for any out of order sample
FIRST - ignore the new value
LAST - override with latest value
MIN - only override if the value is lower than the existing value
MAX - only override if the value is higher than the existing value
As of RedisTimeseries >= 1.4 You can now add samples to a time series where the time of the sample is older than the newest sample in the series. Bundled with that, we now have a policy that will define handling of duplicate samples, and that needs to be supported on the client via the arguments
[DUPLICATE_POLICY policy]
onTS.CREATE
and via[ON_DUPLICATE policy]
onTS.ADD
. The following are the possible policies:BLOCK
- an error will occur for any out of order sampleFIRST
- ignore the new valueLAST
- override with latest valueMIN
- only override if the value is lower than the existing valueMAX
- only override if the value is higher than the existing valueFurther reference: documentation link