Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/295#discussion_r21681310
--- Diff:
tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java ---
@@ -258,11 +232,10 @@ public String call(NettyClientBase client) throws
ServiceException {
}.withRetries();
}
- public String getCachedSessionVariable(final String varname) {
- if (sessionVarsCache.containsKey(varname)) {
- return sessionVarsCache.get(varname);
- } else {
- throw new RuntimeException("No such session variable" + varname);
+ void updateSessionVarsCache(Map<String, String> variables) {
+ synchronized (sessionVarsCache) {
+ this.sessionVarsCache.clear();
--- End diff --
I wonder why all cached variables are cleared before update.
Whenever a set command is executed, a new hash map instance is passed from
the client.
(Please see SetCommand.updateSessionVariable().)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---