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

fix: error in determining timestamp less than #979

Merged
merged 1 commit into from
Nov 14, 2023
Merged

fix: error in determining timestamp less than #979

merged 1 commit into from
Nov 14, 2023

Conversation

weidongkx
Copy link
Contributor

__lt__ is the negation of __gt__ by default.
so samples.Timestamp(1, 1) > samples.Timestamp(1, 1) is false
and samples.Timestamp(1, 1) < samples.Timestamp(1, 1) is true.
but  samples.Timestamp(1, 1) < samples.Timestamp(1, 1) should be false too.
add __lt__ func to fix the bug

```
__lt__ is the negation of __gt__ by default.
so samples.Timestamp(1, 1) > samples.Timestamp(1, 1) is false
and samples.Timestamp(1, 1) < samples.Timestamp(1, 1) is true.
but  samples.Timestamp(1, 1) < samples.Timestamp(1, 1) should be false too.
add __lt__ func to fix the bug
```

Signed-off-by: weidongkl <weidongkl@sina.com>
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@csmarchbanks csmarchbanks merged commit fae24b7 into prometheus:master Nov 14, 2023
11 checks passed
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

Successfully merging this pull request may close these issues.

2 participants