You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Valentin Kulichenko (JIRA)" <ji...@apache.org> on 2017/07/18 22:24:00 UTC
[jira] [Created] (IGNITE-5781) Visor throws ClassCastException if
cache store implementation is other than CacheJdbcPojoStore
Valentin Kulichenko created IGNITE-5781:
-------------------------------------------
Summary: 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
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)