-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
cluster panic : should check field when new point #4796
Conversation
@CrazyJvm -- your change is failing due to formatting issues. https://circleci.com/gh/influxdb/influxdb/7538#artifacts
|
retest this please local : all tests passed and no format problem. |
@otoolep fixed format & test. |
Thanks @CrazyJvm -- can you squash the commits? The messages are not very helpful, so one commit, with one message would be great. |
@@ -962,6 +962,11 @@ func unescapeStringField(in string) string { | |||
// NewPoint returns a new point with the given measurement name, tags, fields and timestamp. If | |||
// an unsupported field value (NaN) is passed, this function returns an error. | |||
func NewPoint(name string, tags Tags, fields Fields, time time.Time) (Point, error) { | |||
//should check field exists |
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.
Minor: can you remove this comment? The code is quite clear without it.
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.
sure
should check field when new point add test fix format fix test should check field when new point remove unnecessary comment should check field when new point fixed export lint issues in services/admin updated CHANGELOG.md corrected URL Backporting changes from build.py to package.sh. Also fixes a few miscellaneous package permissions issues that Debian's lintian complained about. Add interface for heap to support Reverse for `order by desc` linted service/admin
@otoolep removed comment and squashed commits already, but seems introducing another commit. I'm not sure it's ok for you? |
You merged, you didn't rebase. Try this while on your branch: git pull --rebase origin master This assumes your origin is in sync with ours. You will also need to force push to your branch. |
we saw influxdb panic when we use continuous queries in cluster mode, the panic code is :
after investigation , we found the root cause is lack of field check when new point, the current code will not throw any errors but will make above code panic. The reason why there may exist point without fields is that when cq calculate all points in an interval which there's no point in this interval at all.
this PR add field check.
one more thing , really should panic here?
It's better to log error than panic directly I think.