influxdata / influxdata/influxdb

InfluxDB 3 serverless: write operation fails with “Error 403 data outside of the retention period"

Open
#24,642 2 comments 0 reactions 0 assignees View on GitHub
v3
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Hi everyone,

I am using InfluxDB 3 Serverless.
These days I am setting up the write operation to my InfluxDB cloud instance using the newer python client for influxdb 3 [InfluxDB3-python-client](https://github.com/InfluxCommunity/influxdb3-python).

Through the web portal I have set the option “Delete data” to Never to the bucket I am attempting to write in, in order to not have any retention policy restriction.

Despite this, I keep getting the error below if I try to write data having timestamp values older than one year from now.

```
Error exception: (403)
Reason: Forbidden
HTTP response headers: HTTPHeaderDict({'Date': 'Thu, 01 Feb 2024 11:05:48 GMT', 'Content-Type': 'application/json', 'Content-Length': '239', 'Connection': 'keep-alive', 'trace-id': '92d9f2d97d2ea1fb', 'trace-sampled': 'false', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains', 'X-Influxdb-Request-ID': '60b399b4b7d33412a6a141ecec08d27f', 'X-Influxdb-Build': 'Cloud'})
HTTP response body: {"code":"forbidden","message":"dml handler error: data in table Test is outside of the retention period: minimum acceptable timestamp is 2023-07-30T11:05:48.178479165+00:00, but observed timestamp 2022-04-04T05:40:41.079+00:00 is older."}
```

It seems like the minium timestamp accepted corresponds to the initial retention period I have set when the bucket was created for the first time which indeed was 6 months period.
Another detail: the bucket was initially created with HTTP API ([Influx OSS API](https://docs.influxdata.com/influxdb/v2/api/)).

Here is the output from command line verification ` influx bucket list`:

```
{
"createdAt": "2024-01-31T13:29:16.934100615Z",
"description": "create bucket ",
"id": "",
"labels": [],
"links": {
"labels": "/api/v2/buckets/##/labels",
"members": "/api/v2/buckets/##/members",
"org": "/api/v2/orgs/##",
"owners": "/api/v2/buckets/##/owners",
"self": "/api/v2/buckets##",
"write": "/api/v2/write?org=##"
},
"name": "",
"orgID": "",
"retentionRules": [],
"rp": "0",
"schemaType": "implicit",
"type": "user",
"updatedAt": "2024-02-01T12:40:51.625915707Z"
},
```

retentions rules looks empty, which means infinite time retention as I guess. Correct me If I am wrong.

Do you guys have any suggestion where to look?
Do you think it is a default limitation? In this case, I couldn’t find where it is specified.

Thanks,
Nick

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the older-timestamp write with the InfluxDB3 Python client, then compare it with the bucket details from `influx bucket list` and the HTTP API configuration. Determine whether the retention-period rejection is expected for this serverless bucket; done means identifying the responsible setting or behavior and documenting the required fix or explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.