I’m encountering a problem with the way data points are being saved. If I write multiple points in a single operation and each point has a unique timestamp, they are saved correctly. However, if all points share the same timestamp, only one point appears to persist — specifically, the last one in the list. Why is this happening?
I’ve read this FAQ entry on duplicate points, but based on that definition, I don’t believe my points qualify as duplicates.
In my understanding, if points have different tag values, they should be considered distinct. So even if the timestamps are identical, I would expect them to be saved independently.
Here’s an example:
# Abstracted Point class example to minimize boilerplate
ts = datetime.now()
p1 = Point('tableT').tag('attr1', 'a').tag('attr2','b').field('temp', 33).time(ts)
p1 = Point('tableT').tag('attr1', 'd').tag('attr2','f').field('temp', '55').time(ts)
points = [p1, p2]
client.write(points)
I expect both of these points to be written as separate rows, like this:
+--------+--------+------+
| attr1 | attr2 | temp |
+--------+--------+------+
| a | b | 33 |
| d | f | 55 |
+--------+--------+------+
But instead, I get only:
+--------+--------+------+
| attr1 | attr2 | temp |
+--------+--------+------+
| d | f | 55 |
+--------+--------+------+
Only when I assign different timestamps to the points do both of them get written successfully. Why is this necessary, if the tags are different?
Any insight into why this happens, or how InfluxDB is treating these writes internally, would be greatly appreciated.