Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Behaviour when multiple samples with same timestamp is submitted #161

Open
arkocal opened this issue Oct 2, 2019 · 1 comment
Open

Behaviour when multiple samples with same timestamp is submitted #161

arkocal opened this issue Oct 2, 2019 · 1 comment
Assignees

Comments

@arkocal
Copy link
Member

arkocal commented Oct 2, 2019

Only one sample is saved for a component when multiple have the same timestamp. I think this is problematic, because of the following:

  1. We have a resolution of ms, which can be insufficient for some applications.
  2. There is no feedback that only one is saved, possibly creating difficult to spot bugs in user applications.

We should at least properly document this behavior. It could also make sense to return an error or warning when this occurs. It would be expensive to make a check against the data storage, but we can at least check whether there are samples with the same timestamp within a request.

@wagmarcel
Copy link
Member

I am not sure whether this is a true problem. When you get two measurements from a sensor at the same time, then I'd think we have two metrics. If we get two different values of the same metrics with the same timestamp, then the sensor is broken ;-)
True, it might be of interest to give warnings. Implementation could be e.g. backend gives instead of 201 (create) a (e.g. 209 Overwritten) and frontend forwards it. But then, I am not sure whether I'd give this a high priority. For every write to the backend, you'd have to do a read-request first. I'd prefer to leave this sanity testing to the sender. So, yes, documenting and leave it would be the best option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants