Skip to content

Commit

Permalink
ext/lib: choose exemplar with highest value (#22)
Browse files Browse the repository at this point in the history
Choose the exemplar with the highest value for safety.
  • Loading branch information
GiedriusS authored Mar 28, 2024
1 parent c4e122a commit a6c126a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/fast_mmaped_file_rs/src/file_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl EntryMetadata {
if self.ex.is_some() {
let selfex = self.ex.clone().unwrap();

if selfex.timestamp < otherex.timestamp {
if selfex.timestamp < otherex.timestamp || (selfex.timestamp == otherex.timestamp && selfex.value < otherex.value) {
self.ex = other.ex.clone();
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/prometheus/client/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Prometheus
module Client
VERSION = '1.6.0'.freeze
VERSION = '1.7.0'.freeze
end
end

0 comments on commit a6c126a

Please sign in to comment.