Skip to content

Commit

Permalink
Fix #868 by advancing the scanner end time by one second. That will
Browse files Browse the repository at this point in the history
force the scan to the next row and allow the serializer to filter
out the unwanted results. Thanks @rcastbergw!

Signed-off-by: Chris Larsen <[email protected]>
  • Loading branch information
manolama committed Dec 14, 2016
1 parent 7223183 commit 3e12948
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/TsdbQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,11 @@ private long getScanEndTimeSeconds() {
// Convert to seconds if we have a query in ms.
if ((end & Const.SECOND_MASK) != 0L) {
end /= 1000L;
if (end - (end * 1000) < 1) {
// handle an edge case where a user may request a ms time between
// 0 and 1 seconds. Just bump it a second.
end++;
}
}

// The calculation depends on whether we're downsampling.
Expand Down

0 comments on commit 3e12948

Please sign in to comment.