-
Notifications
You must be signed in to change notification settings - Fork 478
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
Cache version per influxdb instance and reduce ping() calls for every… #472
Conversation
… query call, closes #470
Codecov Report
@@ Coverage Diff @@
## master #472 +/- ##
============================================
+ Coverage 86.63% 86.65% +0.02%
- Complexity 302 303 +1
============================================
Files 20 20
Lines 1294 1296 +2
Branches 135 135
============================================
+ Hits 1121 1123 +2
Misses 113 113
Partials 60 60
Continue to review full report at Codecov.
|
@@ -313,7 +314,10 @@ public Pong ping() { | |||
|
|||
@Override | |||
public String version() { | |||
return ping().getVersion(); | |||
if (version == "") { |
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.
You are still programming in Javascript here. :-P
What about replacing ""
with null
here and remove ""
from the variable declaration?
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.
You are right, to much different languages, java is getting out of my head by the time :-). Fixed
I would like to ask how the client can know if the server side is upgraded to a new version ? |
The client cant, we promise compatibility to 1.1 onwards. We could probably add a check in the constructor which crashes once, but the current code does this check on every query which is awkward. What do you think ? |
A check (for server version) in the constructor is also the approach I would like to use for MessagePack so of course I would vote for it. For the cached version, it may go a bit confused and inconsistent (when the server side version changes, yet not very likely) for user so I just think we can document the method version() explicitly on this |
… query call, closes #470