-
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
Add DELETE query support #6484
Add DELETE query support #6484
Conversation
+1 |
@@ -344,6 +344,7 @@ func (c *Cache) DeleteRange(keys []string, min, max int64) { | |||
c.store[k].filter(min, max) | |||
if c.store[k].count() == 0 { | |||
delete(c.store, k) | |||
continue |
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.
This will skip the c.size
decrement below. Should add a c.size -= uint64(origSize)
before continue
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.
Fixed in 2cf25a1.
Needs a |
01c019a
to
2cf25a1
Compare
@jwilder I forgot to push the |
This commit adds query language support for deleting series with a `DELETE` query.
2cf25a1
to
f7af787
Compare
👍 |
OMGYES! @benbjohnson any initial thoughts on how performant this is? Is it something a user could run during normal operations or would it be advisable only against a quiescent database? What's the difference between |
@beckettsean I'm not sure. @jwilder did the tsm1 implementation. He could probably speak on the performance characteristics. |
@beckettsean I'm still testing performance. Should work like The difference between This behavior is a little odd after playing with this because, if you restart the server, the series are gone. @pauldix is there reason why |
Thanks for adding this. |
Overview
This commit adds query language support for deleting series with a
DELETE
query.Fixes #1647
/cc @jwilder
Required for all non-trivial PRs
Required only if applicable