Influxdb seemingly not accepting timestamps

Hello, I am using

InfluxDB v2.7.11
Server: fbf5d4a
Frontend: f4b5694

And

influxdb-client
Version: 1.48.0

I am generating line protocol queries of the form

my_stats,source=my_stats,uuid=05764e13-5113-4fd3-84f8-2953b33bxxxx hdr_version=1i 1735527537140999936

This query is validated by: my eyes (looking at the line protocol directives on influxdb), chatGPT, coPilot… I was unable to find an online line protocol checker.

This query makes it into influxdb, I can see the record being added and I can see the correct field value. However, the timestamp is not properly set. influxdb will always show the current timestamp of the influxdb host, at the time of the read query.
There is seemingly no error reported by the api or the influxdb terminal.

Looking around this seems to happen if the provided timestamp during the write query is not accepted by influxdb.

Looking at why the specified write timestamp my be rejected, I can see different sources:

  • the WritePrecision provided through the write api is wrong. I am using nanosecond resolution here which seems to be the default. I have forced it to use WritePrecision.NS with similar failure. I have switched to millisecond and second resolutions and this also fails.
  • The format of the timestamp is wrong. I have confirmed the correct timestamp value online with epoch checkers.
  • Some searches suggested enabling custom timestamps through the influxdb UI for the specific bucket, I could not find this. The only parameter I can change is the retention policy, which I have set as infinite.
  • I have also run examples available online on how to use the influxdb-client api to generate records. I still cannot set a timestamp at write time.

I have found numerous posts of people reporting this issue, though no answers to it. Some people have hinted at a bug.

Any help debugging/fix this will be greatly appreciated.

@fv0 Can you provide the query you’re using the read the written data?