Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Last error time now updates during record interpolation #2923
Fix: Last error time now updates during record interpolation #2923
Changes from all commits
8d1e259
8e359f7
7e4f459
87d6dfe
9d206ee
d41127c
2bf434e
ae7ef89
f335b19
6a27a9c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
ErrorIs
does not work forspotPriceError
so I changed it to anEquals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious, do we not need to add
startRecord.LastErrorTime.Equal(startRecord.Time)
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider the case where:
endRecord = {Time: 2, LastErrTime: 0}
startRecord = {Time: 1, LastErrTime: 1}
The conditions will evaluate to the following:
endRecord.LastErrorTime.After(startRecord.Time)
- FalseendRecord.LastErrorTime.Equal(startRecord.Time)
- FalsestartRecord.LastErrorTime.Equal(startRecord.Time)
- TrueWithout the third condition, the calculation proceeds. And we do not want it to proceed because the startRecord has an error at its time.
The case is definitely possible because the startRecord might have been interpolated before being passed to this function (e.g. from
{Time: 0, LastErrTime: 0}
to{Time: 1, LastErrTime: 1}
) while the endRecord is untouched.