-
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
List series should have option to return shard space mapping #867
Comments
👍 |
why not just add the space column in the returned data for "list series" ? is it expensive ? |
@schmurfy agree, I don't see a reason why make the query more complicated than just |
is there any news on this feature ? I currently have a test system running fine but I would like to check that everything is going where I think it is before pushing it to production. |
@jvshahid, @schmurfy returning the space mapping per series would definitely be more expensive. Unless we cached that mapping. Basically, for each series name we'd loop through the shard spaces and see if it matches the regex. It's certainly easier to do this feature without the updates to the query grammar. I could run a few tests to see how much it slows down the query. |
Just tested on my laptop with 500k series. Without including the space name was about 2s to run list series. With space names it was about 2.7s. Obviously, it'll have a greater impact when going over a network, but gzip will help quite a bit with that. What you think @jvshahid, good enough? |
I forgot to mention that was with 3 shard spaces defined. |
alternatively we could also keep 'list series' just the list of series, and have a command like |
@pauldix as a temporary measure could you share the modified I think the real question for implementing this feature is: how is |
Fixes #867. Updated lexer and parser to work, added code to coordinator to insert spaces if requested.
great point! all of this, of course, needs to be as fast as possible. certain things can be cached but even on first hit it should still be fast, and we can't cache for long anyway because new series should become visible quickly. That's why the ability to retrieve the list of series (filtered by regex) as fast as possible is so important for the graphite-api use case (see also #884) |
Also my 5c to the previous comment: For 1kk series (250k series with 4 spaces), it could take really really a lot. 10 quereis, let's say 500ms each - it'll be 5 seconds just to ensure that graph can be plotted. And update period is 30-60s. And what if there'll be more graphs? In my experience there could be 700k series without spaces (and with it'll be more then 2kk), how fast it would work? Though it's only my opinion as a user. |
thanks :) |
are you sure the result is reliable ? Can anyone confirm it can returns something other than default ? |
@pauldix on a somewhat related topic would it be possible to add a similar way to return the shard space when doing a select ? It would return the real space where the point was read instead of where it would end up being stored, I think both make sense to track down configuration errors. |
The test checks mappings to other spaces: https://github.com/influxdb/influxdb/blob/master/integration/single_server_test.go#L146-L181 I'm wondering if there's a problem here where you created shard spaces, but didn't have a catch all space (like the default). Then you wrote data in and it fell through and then created the default space. The problem is that when spaces are created, they get put at the front of the list so they are evaluated first. So after that everything gets assigned to the default. Not sure, just a guess. Can you post a gist of http://localhost:8086/cluster/configuration?u=root&p=root? |
it seems to work now, what I did in the interval was remove the database an recreate it with a master build (to get the "include spaces" option). |
So users can be sure they've set things up properly, they should be able to see which shard space a give series will be mapped to.
It seems the easiest way to do this is to have an option on list series that will have it return the shard space name each series will be mapped to. Like
The
, space
would be optional. If included the result would look something like:I'm open to other potential query syntax, this was just my first idea.
The text was updated successfully, but these errors were encountered: