Skip to content

Conversation

@jreynard-code
Copy link
Member

@jreynard-code jreynard-code commented Jan 22, 2025

Depending on target deployment environment, Redis TS can have DUPLICATE_POLICY set to BLOCK. Until now, Redis TS created by Cosmotech API relied on target environment (without override the default value) As we log every API calls, when API is flooded, it can lead to HTTP errors 500 when Redis is deployed with DUPLICATE_POLICY set to BLOCK (https://redis.io/docs/latest/develop/data-types/timeseries/configuration/#duplicate_policy).

To prevent that, every Redis TS will be created now with DUPLICATE_POLICY set to MAX. Doing that, will not lead to HTTP 500 error and if X Redis TS will be created with the same timestamp, only the TS with the maximum value will be kept.

Note: You should delete all previously created one. A Redis TS cannot be changed/upgraded

…ech API.

Depending on target deployment environment, Redis TS can have DUPLICATE_POLICY set to BLOCK.
Until now, Redis TS created by Cosmotech API relied on target environment (without override the default value)
As we log every API calls, when API is flooded, it can lead to HTTP errors 500 when Redis is deployed with DUPLICATE_POLICY set to BLOCK (https://redis.io/docs/latest/develop/data-types/timeseries/configuration/#duplicate_policy).

To prevent that, every Redis TS will be created now with DUPLICATE_POLICY set to MAX. Doing that, will not lead to HTTP 500 error and if X Redis TS will be created with the same timestamp, only the TS with the maximum value will be kept.

Note: You should delete all previously created one. A Redis TS cannot be changed/upgraded
@jreynard-code jreynard-code changed the title Force DuplicatePolicy for Redis TS created programmatically by Cosmot… Force DuplicatePolicy for Redis TS created programmatically by Cosmotech API. Jan 22, 2025
@jreynard-code jreynard-code merged commit 2930b0e into main Jan 23, 2025
33 checks passed
@jreynard-code jreynard-code deleted the set_duplicate_policy_to_max branch January 23, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants