Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Points don't arrive in order. #324

Closed
MicahZoltu opened this issue Apr 4, 2021 · 1 comment
Closed

Points don't arrive in order. #324

MicahZoltu opened this issue Apr 4, 2021 · 1 comment
Milestone

Comments

@MicahZoltu
Copy link
Contributor

Expected Behavior:
When I submit two points with the same timestamp/tags/measurement but different values, based on https://docs.influxdata.com/influxdb/cloud/write-data/best-practices/duplicate-points/ I should expect to see the field values on the second point end up in the database and the field values from the first point overwritten.

Current Behavior:
If I call writePoint two times in a row in rapid succession (e.g., right after each other or within milliseconds of each other), I see the values of the first point end up in the database more often than not.

Possible Solution:
If I put the second write into a setTimeout(() => writePoint(point), 5000), I correctly see the overwriting occur as expected.

Steps/Code to Reproduce the Problem:

const time = new Date()
let point = new Point('my-measurement')
point.timestamp(time)
point.intField('hello', 5)
writeApi.writePoint(point)
point = new Point('my-measurement')
point.timestamp(time)
point.intField('hello', 7)
writeApi.writePoint(point)

Notice that if you do a bunch of these, 5 ends up in the database often.

Specifications:

  • Version: 2.0.4-Alpine
  • Platform: Docker

Notes:
I do not know where exactly the issue here is, and it might be an issue on the InfluxDB side of things, but I figured I would start with the JS library as that is what I am interfacing with.

@MicahZoltu
Copy link
Contributor Author

Nevermind, my code just was not executing in the order I thought it was due to a subtle bug. Sorry for the false bug report!

@bednar bednar added this to the 1.13.0 milestone Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants