forked from influxdata/kapacitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: return an error when aggregating a point fails
When the `AggregatePoint` method failed to convert the point to the proper type, an error would happen and the underlying influxql code would never receive the point within the aggregator. But, the batch size would be incremented because the error was swallowed instead of being reported back to the task node. This meant the task believed that at least one point had been aggregated and it would attempt to emit a point from aggregators that could not emit without at least one point. This change fixes the task so that it reports the error when it happens instead of swallowing the error. This way, the error doesn't hide itself with little evidence. This has also been changed so the batch size is only incremented when an error doesn't happen. The code had a path flow of incrementing the batch size before it knew if an error happened when aggregating or not.
- Loading branch information
1 parent
72e88b9
commit d4c1792
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters