Skip to content

Enforce timestamp monotonicity #481

Closed

Description

@beorn7

The storage requires that samples are sorted by timestamp, i.e. a timestamp that is saved to the storage layer must have a timestamp at least as high as the previous sample. This constraint is just by contract so far. It is not checked or enforced.

Unfortunately, that's not trivial as a time series might already be archived when a sample for it comes in again. It's pretty expensive to unarchive a series just to check the latest timestamp.

Ideas:

  • Never accept timestamps from the future (+/- a certain tolerated skew).
  • Then the mtime of a time series file is an upper bound for the last timestamp.
  • Save the last timestamp in the series object.

Activity

  1. self-assigned this
    on Jan 27, 2015
  2. changed the title [-]Enforce timestamp monotony[/-] [+]Enforce timestamp monotonicity[/+] on Mar 14, 2015
  3. juliusv commented on Jul 12, 2015

    @juliusv
    Member

    When we append a new sample to an archived series, we unarchive the series anyways and get the last timestamp of the series from the unarchiving. So even that case seems to be cheap to check.

    Implementation: #889

  4. lock commented on Mar 24, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  5. locked and limited conversation to collaborators on Mar 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions