Skip to content

Conversation

@tkaemming
Copy link
Contributor

@tkaemming tkaemming commented Apr 28, 2017

#nochanges

@tkaemming
Copy link
Contributor Author

Adding to the list of "things that should be done but I don't really want to do them right now": there should be a base test suite (similar to the Redis backend test suite) that runs the same test methods against each backend to ensure that all backends support the same functionality correctly.


def delete_frequencies(self, models, keys, start=None, end=None, timestamp=None):
"""
Delete all distinct counters.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

Copy link
Contributor

@LewisJEllis LewisJEllis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

for model in models:
for key in keys:
model_key = self.get_model_key(key)
client.hdel(
Copy link
Contributor

@LewisJEllis LewisJEllis Apr 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it worth trying to think "are we going to end up just deleting all keys in this hash?" and then just delete the whole toplevel hash key instead of each entry one by one, or is that not going to be happening much?

},
}

self.db.delete_frequencies(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be nice to have a test case where we delete just a sub-time-interval of the data and assert on the stuff that remains? current cases all just gut the dataset entirely unless I'm misreading something

@tkaemming tkaemming merged commit 5a3792f into master May 1, 2017
@tkaemming tkaemming deleted the tsdb-delete branch May 1, 2017 18:25
tkaemming added a commit that referenced this pull request May 25, 2017
…e operations. (#5451)

This was an oversight as part of GH-5317, and wasn't caught in tests because the test suite didn't actually run the tests against multiple databases. The easiest way to test this (other than depending on the tests to have the correct behavior) is to cross-reference the routing logic in the other mutation commands and make sure it's consistent.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants