Metrics are not stored when setting non default retention policy

I’m using open source verison of InfluxDB on Windows with default settings. Tried 1.6.4 and 1.7.1
When I specify any retention policy then default, the data is not stored.

For test purposes I’ve created two identical retention policies - default and non_default:

show retention policies
name duration shardGroupDuration replicaN default

default 168h0m0s 24h0m0s 1 true
non_default 168h0m0s 24h0m0s 1 false

When I’m posting data with non_default retencion policy nothing happens. Server returns success but there is no data in metrics.

$ curl -i -XPOST " http://influx1:8086/write?db=test&rp=non_default" --data-binary ‘TestViaHttp,mytag=a myfield=90’

When I’m posting data with default retencion policy it is inserted successfully.

$ curl -i -XPOST " http://influx1:8086/write?db=test&rp=default" --data-binary ‘TestViaHttp,mytag=a myfield=90’

Does anyone have an idea how to fix this?

Hi ,
Did you specify the retention policy when retrieving the data ?
Best regards

1 Like

Nope. Did know it matters. Thanks.

The folowing request shows inserted data.
SELECT * FROM "non_default"."TestViaHttp"