You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/19 12:58:00 UTC
[jira] [Commented] (IGNITE-5781) Visor throws ClassCastException if
cache store implementation is other than CacheJdbcPojoStore
[ https://issues.apache.org/jira/browse/IGNITE-5781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093027#comment-16093027 ]
ASF GitHub Bot commented on IGNITE-5781:
----------------------------------------
GitHub user Desperus opened a pull request:
https://github.com/apache/ignite/pull/2321
IGNITE-5781 Visor throws ClassCastException if cache store implementa…
…tion is other than CacheJdbcPojoStore
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Desperus/ignite IGNITE-5781
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/2321.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2321
----
commit bc038be5540e5fd8148509e31ac1b51afe37eecf
Author: Aleksandr_Meterko <al...@epam.com>
Date: 2017-07-19T12:55:15Z
IGNITE-5781 Visor throws ClassCastException if cache store implementation is other than CacheJdbcPojoStore
----
> Visor throws ClassCastException if cache store implementation is other than CacheJdbcPojoStore
> ----------------------------------------------------------------------------------------------
>
> Key: IGNITE-5781
> URL: https://issues.apache.org/jira/browse/IGNITE-5781
> Project: Ignite
> Issue Type: Bug
> Components: visor
> Affects Versions: 2.0
> Reporter: Valentin Kulichenko
> Assignee: Aleksandr Meterko
> Fix For: 2.2
>
>
> Issue is reported on user list: http://apache-ignite-users.70518.x6.nabble.com/Problem-with-Visor-and-Cassandra-Cache-Store-td15076.html
> There is an obvious bug in the code. {{VisorCacheJdbcType#list}} method checks the type of store factory like this:
> {code}
> if (factory != null || factory instanceof CacheJdbcPojoStoreFactory) {
> CacheJdbcPojoStoreFactory jdbcFactory = (CacheJdbcPojoStoreFactory) factory;
> {code}
> It should be {{&&}} instead of {{||}}, because otherwise condition will be {{true}} for any factory that is not {{null}}. Even better if {{factory != null}} is removed completely as {{instanceof}} returns {{false}} for {{null}} values anyway.
> However, it's not clear to me why this scenario is reproduced only in certain conditions (see mailing list thread for details). It's possible that there is another hidden bug, this needs to be investigated.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)