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

Please remove ping checks from query method #470

Closed
dmoebius opened this issue Jul 19, 2018 · 1 comment · Fixed by #472
Closed

Please remove ping checks from query method #470

dmoebius opened this issue Jul 19, 2018 · 1 comment · Fixed by #472
Milestone

Comments

@dmoebius
Copy link

In InfluxDBImpl::query() there are two version checks at the top, both pinging the server twice (!!!) for the version number:

public void query(final Query query, final int chunkSize, final Consumer<QueryResult> consumer) {
    if (version().startsWith("0.") || version().startsWith("1.0")) {
        throw new UnsupportedOperationException("chunking not supported");
    }
    ...

Please either remove those version checks completely (I think nobody uses these old versions anymore), or cache the result of version(), or query each server only once for it's version number.

@majst01
Copy link
Collaborator

majst01 commented Jul 21, 2018

Hi @dmoebius ,

good catch, do you mind prepping a MR ? It will take a while because holidays are coming :-)

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 a pull request may close this issue.

2 participants