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 derivative preserving fields from wrong point in stream #1414

Merged
merged 1 commit into from
Jun 1, 2017
Merged

fix derivative preserving fields from wrong point in stream #1414

merged 1 commit into from
Jun 1, 2017

Conversation

phemmer
Copy link

@phemmer phemmer commented May 31, 2017

#1333 changed the derivative node to add the derivative to the current point instead of the previous one. However due to a typo in the code, for stream nodes, it effectively resulted the emitted point containing the values of the previous point, the timestamp of the current point, and the derivative of the current point.

When using batch, the result was as it's supposed to be (values, timestamp, and derivative all from the current point). The batch code had the same typo, it worked because of ordering of the code.

Unfortunately there were no tests that would have caught the behavior, so I added some.

Required for all non-trivial PRs
  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated
  • Sign CLA (if not already signed)

@nathanielc
Copy link
Contributor

@phemmer Thanks! I'll take a look at this tomorrow.

Copy link
Contributor

@nathanielc nathanielc left a comment

Choose a reason for hiding this comment

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

@desa Can you review this as well?

In summary the issue was we carried forward the other fields from the previous point instead of the current point, which is odd since the time is of the current point as well as the derivative result.

Makes sense why we didn't catch it first as it is not the most common use case but glad we now have tests for it ❤️.

@nathanielc nathanielc requested a review from desa June 1, 2017 15:14
@nathanielc
Copy link
Contributor

@phemmer We are planning to release a version 1.3.1 with this fix. Can you change the PR to target the v1.3 branch? Thanks

@phemmer phemmer changed the base branch from master to v1.3 June 1, 2017 17:03
@phemmer
Copy link
Author

phemmer commented Jun 1, 2017

branch changed.

@desa
Copy link
Contributor

desa commented Jun 1, 2017

LGTM 👍

@desa
Copy link
Contributor

desa commented Jun 1, 2017

@phemmer can you rebase onto v1.3 and drop the other commits?

@phemmer
Copy link
Author

phemmer commented Jun 1, 2017

Whoops. Didn't notice that after I switched the branch. Done.
Should I also add a note to the CHANGELOG?

@nathanielc
Copy link
Contributor

@phemmer

Should I also add a note to the CHANGELOG?

Yes please, I added a 1.3.1 section.

@phemmer
Copy link
Author

phemmer commented Jun 1, 2017

done

@nathanielc nathanielc merged commit 6c77c03 into influxdata:v1.3 Jun 1, 2017
nathanielc added a commit that referenced this pull request Jun 1, 2017
fix derivative preserving fields from wrong point in stream
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.

3 participants