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

[query] Graphite fetches truncated to resolution #1997

Merged
merged 4 commits into from
Oct 15, 2019

Conversation

arnikola
Copy link
Collaborator

What this PR does / why we need it:
Graphite fetches would always be truncated to start point, which can cause flapping when refreshing a series.

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:

None

Does this PR require updating code package or user-facing documentation?:

None

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 65.5% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 67.4% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 65.5% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 67.4% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 58.3% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 69.5% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 58.3% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 69.5% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 65.5% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 67.4% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 58.3% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 69.5% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 58.3% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 69.5% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 65.5% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 67.4% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1997   +/-   ##
=======================================
  Coverage    63.6%    63.6%           
=======================================
  Files        1122     1122           
  Lines      106581   106581           
=======================================
  Hits        67830    67830           
  Misses      34421    34421           
  Partials     4330     4330
Flag Coverage Δ
#aggregator 37.4% <0%> (ø) ⬆️
#cluster 56.3% <0%> (ø) ⬆️
#collector 65.5% <0%> (ø) ⬆️
#dbnode 65% <0%> (ø) ⬆️
#m3em 51% <0%> (ø) ⬆️
#m3ninx 61.1% <0%> (ø) ⬆️
#m3nsch 51.1% <0%> (ø) ⬆️
#metrics 17.7% <0%> (ø) ⬆️
#msg 74.7% <0%> (ø) ⬆️
#query 67.4% <0%> (ø) ⬆️
#x 74.8% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...5ad40e6. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #1997 into master will decrease coverage by <.1%.
The diff coverage is 86.6%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1997     +/-   ##
=========================================
- Coverage    63.6%    63.6%   -0.1%     
=========================================
  Files        1122     1122             
  Lines      106581   106544     -37     
=========================================
- Hits        67830    67789     -41     
  Misses      34421    34421             
- Partials     4330     4334      +4
Flag Coverage Δ
#aggregator 79.7% <ø> (+42.3%) ⬆️
#cluster 56.4% <ø> (ø) ⬆️
#collector 63.7% <ø> (-1.9%) ⬇️
#dbnode 65% <ø> (-0.1%) ⬇️
#m3em 59.6% <ø> (+8.5%) ⬆️
#m3ninx 61.1% <ø> (-0.1%) ⬇️
#m3nsch 51.1% <ø> (ø) ⬆️
#metrics 17.7% <ø> (ø) ⬆️
#msg 74.9% <ø> (+0.1%) ⬆️
#query 68.6% <86.6%> (+1.2%) ⬆️
#x 75% <ø> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 898b352...f53b511. Read the comment docs.

@@ -128,6 +147,7 @@ func translateTimeseries(
m3list := result.SeriesList
series := make([]*ts.Series, len(m3list))
resolutions := result.Metadata.Resolutions
fmt.Println("Resolutions", resolutions)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably can remove this yeah?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops thought I got them all

continue
}

if ts.After(end) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think each step is inclusive at the start and exclusive at the end yeah? i.e. [start, end)

Otherwise a single datapoint would fall into two steps if it aligned with the resolution exactly no?

As such, it sounds like this should be if !ts.Before(end) { break }?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also another question... are we worried the values will ever be returned out of order? Heh. Cause if so it'd be better to continue here rather than break. It's possible that would be overly defensive programming, but if the underlying storage ever was something else that didn't use our series iterators I suppose that would be possible... (at graphite would be fine since it always uses consolidation and values.SetValueAt(idx, value).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, good point re: !Before; was thinking that I may have dropped some points due to truncation so wanted to keep as much as possible, but the dual-read is a good point.

About the break v continue, I think that if we have non-ordered series coming in, there's a lot of places that would break worse than this haha. Also given it's m3_wrapper.go, I think it's fine to assume it's ordered :P

Copy link
Collaborator

@robskillington robskillington left a comment

Choose a reason for hiding this comment

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

LGTM other than the comment about if !ts.Before(end) { ... }

@arnikola arnikola merged commit cd47e21 into master Oct 15, 2019
@arnikola arnikola deleted the arnikola/align-graphite branch October 15, 2019 04:28
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