Skip to content
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

Support delete with predicate functionality via /api/v2/delete #19635

Closed
stuartcarnie opened this issue Sep 24, 2020 · 11 comments · Fixed by #20236
Closed

Support delete with predicate functionality via /api/v2/delete #19635

stuartcarnie opened this issue Sep 24, 2020 · 11 comments · Fixed by #20236
Assignees
Labels
area/storage area/2.x OSS 2.0 related issues and PRs team/storage

Comments

@stuartcarnie
Copy link
Contributor

What

To ensure feature parity with Cloud 2.0, InfluxDB OSS 2.0 requires an implementation of the delete with predicate API via /api/v2/delete. This will require enhancements to the tsdb package and storage engine.

Background

The API was disabled per #19580 and returns 501 Not Implemented as there was no equivalent 1.x tsdb storage API to support this feature. The following DeleteSeries API was evaluated

func (s *Store) DeleteSeries(database string, sources []influxql.Source, condition influxql.Expr) error {

however, due to differences between series keys in TSM 2.0 vs 1.x, it is unable to support fine-grained delete functionality for a predicate that targets a specific field:

_measurement = 'cpu' AND _field = 'usage_user'
@benbjohnson
Copy link
Contributor

Update: I'm in the thick of it and there's more code to move over from idpe than I expected. Hopefully this coming week it will be done.

@8none1
Copy link
Contributor

8none1 commented Oct 6, 2020

Per discussions with the 2.0 GA team this is being de-prioritised in favour of backup and restore:
#19316

randycoulman pushed a commit to influxdata/telemetry_influxdb that referenced this issue Oct 20, 2020
The tests are currently failing due to the removal of the delete-with-predictate API.

It was removed in influxdata/influxdb#19580 and there is an open issue for restoring it in influxdata/influxdb#19635.
randycoulman pushed a commit to influxdata/telemetry_influxdb that referenced this issue Oct 22, 2020
The tests are currently failing due to the removal of the delete-with-predictate API.

It was removed in influxdata/influxdb#19580 and there is an open issue for restoring it in influxdata/influxdb#19635.
@cgfoed
Copy link

cgfoed commented Nov 13, 2020

I'm sorry to ask a seemingly stupid question, but im trying to delete data using CLI for nearly an hour now (and also tried the curl method).
How exactly is it possible to delete data right now in Version 2.0.0 (37cc047)?

My last tries where looking like that:
influx delete --org myOrg --bucket test_bucket --start '1970-01-01T00:00:00.00Z' --stop '2020-01-01T00:00:00.00Z' --token VeryLongTokenFromRootHere
resulting in
Error: Failed to delete data: Not implemented.

@timhallinflux
Copy link
Contributor

@cgfoed For OSS, this issue states that it isn't possible to selective delete data. You have to drop the entire bucket until this issue is resolved.

@newskooler
Copy link

When is this issue expected to be resolved? Not managing to delete data is a big issue.

@zbot473
Copy link

zbot473 commented Dec 2, 2020

I'm not even able to delete without predicate, and backup/restore is not really an alternative IMHO.

I understand that OSS is probably lower priority because we aren't paying, but please consider fixing this quickly.

@doivosevic
Copy link

doivosevic commented Dec 2, 2020 via email

@benbjohnson
Copy link
Contributor

Pending PR for the fix: #20236

@zbot473
Copy link

zbot473 commented Dec 2, 2020

Thanks!

@timhallinflux
Copy link
Contributor

plan is to drop this into 2.0.3 early next week.

@agolovenko
Copy link

Thanks for fixing this. However, I must say that this is not the first "surprise" while using what is supposed to be "GA version". Seems like your marketing department runs far ahead of development. As a result: trying to migrate my project to Influx 2x looked like a premature decision in hindsight and I ended up wasting quite some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage area/2.x OSS 2.0 related issues and PRs team/storage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants