influxdata / influxdata/influxdb

Changing the Aggregation Selection in a Check Can Cause the Check to Fail

Open
#20,605 2 comments 0 reactions 0 assignees View on GitHub
kind/bug severity/sev-4 team/dumplings team/ui v2-prod-bug
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

1. Have a measurement where the field value is an integer
2. Create a Check, and leave the default aggregation to mean()
3. Let the check run once
4. Reopen the check, and change the aggregation to max()

Result:
The check fails because Max() now returns an integer, and the Check task tries to write an integer to a field that was first written with a float. This information is available by searching the _task bucket.

Expected:
The Check does not fail. At a minimum, provide an error message so the user has a hope of figuring out what the problem is.

From the task log:
```
"message":"could not execute task run; Err: partial write: field type conflict: input field \"n\" on measurement \"statuses\" is type float, already exists as type integer dropped=1: partial write: field type conflict: input field \"n\" on measurement \"statuses\" is type float, already exists as type integer dropped=1"}]
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by changing a Check aggregation from mean() to max() after one run, then inspect the _task bucket and task log for the field type conflict. Trace the Check task behavior around writing the changed aggregation result; done means the Check no longer fails, or reports a clear error explaining the type conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.