redis / NRedisStack

Redis Stack .Net client
MIT License
225 stars 37 forks source link

TimeSeries Create function always creates the TS as "uncompressed" when specifying true or false to the function argument #319

Closed Auttcast closed 1 month ago

Auttcast commented 2 months ago

NRedisStack Version: 0.12.0

Description:

Expected: I'm calling the TS create function with the uncompressed argument set to false, expecting that it should create the TS with compression enabled.

Actual: The TS is still created as uncompressed.

Notes: In debugging with redis MONITOR I can see that specifying true or false still issues a TS.CREATE with the UNCOMPRESSED parameter set.

It looks like the problem is with this function in TimeSeriesParamsBuilder where it is setting the UNCOMPRESSED option entirely based on the presence of the arg regardless of it's value. https://github.com/redis/NRedisStack/blob/master/src/NRedisStack/TimeSeries/TimeSeriesParamsBuilder.cs#L109

Workaround: Set the uncompressed argument to null

uglide commented 1 month ago

Hello @Auttcast

Thanks for the bug report. We will address it soon.