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

Wire up DROP CONTINUOUS QUERY #1631

Merged
merged 2 commits into from
Mar 25, 2015
Merged

Wire up DROP CONTINUOUS QUERY #1631

merged 2 commits into from
Mar 25, 2015

Conversation

toddboom
Copy link
Contributor

Format is:

DROP CONTINUOUS QUERY foo ON bar

Where foo is the name of the query and bar is the database. It should only delete the continuous query. Shouldn't have to drop any data, just remove the CQ

@toddboom toddboom self-assigned this Mar 3, 2015
@beckettsean beckettsean modified the milestones: 0.9.0, Next Release Mar 14, 2015
@toddboom toddboom modified the milestone: Next Point Release Mar 14, 2015
@pauldix pauldix added this to the 0.9.0 milestone Mar 14, 2015
}
}

if cqIndex == -1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

So actually, this could happen, even if everything is OK. If two "drop CQ" commands for the same CQ hit the cluster at different nodes at the same time, one will win, but the other may still have gotten through before the first deletion finished. So if this happens, simply return nil here. In other words, make this operation idempotent.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this could happen in lots of other places too, actually, so maybe it doesn't matter. Worse thing that happens is that the user gets "does not exist" back, which is what he wanted anyway. So doesn't matter.

@otoolep
Copy link
Contributor

otoolep commented Mar 25, 2015

Looks good, +1. Ignore my comment about the race issue, it doesn't really matter.

toddboom added a commit that referenced this pull request Mar 25, 2015
@toddboom toddboom merged commit 6de597a into master Mar 25, 2015
@toddboom toddboom deleted the drop-continuous-query branch March 25, 2015 19:42
@btashton
Copy link
Contributor

btashton commented Apr 1, 2015

The test looks good to me, but I have not actually been able to get this to work against a running InfluxDB server, see #2141

mark-rushakoff pushed a commit that referenced this pull request Jan 11, 2019
feat(ui/DataLoaders): Streaming/Listening step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants