influxdata / influxdata/influxdb

[v2] delete with predicate doesn't handle negation of measurement names properly

Open
#26,842 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/2.x area/api team/edge
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

For this predicate "predicate": "_measurement!=m1" against the v2 api/v2/delete api, I would expect all measurements in the bucket except m1 to be deleted for the time range of the delete; but it appears that nothing is deleted.

The code parses out the measurement name but doesn't keep track of the negation so it thinks you want to delete m1 so it tries but then that always fails on the predicate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing predicate parsing and measurement-name handling in the v2 api/v2/delete endpoint, then reproduce the _measurement!=m1 case for a bounded time range. Done means deletion removes all measurements except m1, while positive measurement predicates continue to behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.