You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2018/08/13 10:56:00 UTC
[jira] [Commented] (IGNITE-8834) SqlQuery not throwing exception
after partition loss events
[ https://issues.apache.org/jira/browse/IGNITE-8834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578107#comment-16578107 ]
Vladimir Ozerov commented on IGNITE-8834:
-----------------------------------------
Possibly linked to https://issues.apache.org/jira/browse/IGNITE-8927
> SqlQuery not throwing exception after partition loss events
> -----------------------------------------------------------
>
> Key: IGNITE-8834
> URL: https://issues.apache.org/jira/browse/IGNITE-8834
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.4, 2.5
> Reporter: Anton Kurbanov
> Priority: Major
> Labels: sql-stability
>
>
> Precondition: 3 server nodes, client listening for partition loss events, partitioned cache with backups = 1, partition loss policy = READ_ONLY_SAFE, stream some data. Kill 2 nodes, call:
> {code:java}
> SqlQuery<Integer, Integer> query = new SqlQuery<>(Integer.class, "where _key>0");
> query.setLocal(false);
> List<Cache.Entry<Integer, Integer>> list = cache.query(query).getAll();
> {code}
> Cache configuration:
> {code:java}
> public IgniteConfiguration getCfg() {
> IgniteConfiguration cfg = new IgniteConfiguration();
> cfg.setConsistentId(cfg.getIgniteInstanceName());
> cfg.setIncludeEventTypes(EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST);
> TcpDiscoverySpi discovery = new TcpDiscoverySpi();
> TcpDiscoveryVmIpFinder finder = new TcpDiscoveryVmIpFinder();
> finder.setAddresses(Arrays.asList("127.0.0.1:47500..47509"));
> discovery.setIpFinder(finder);
> cfg.setDiscoverySpi(discovery);
> QueryEntity queryEntity = new QueryEntity();
> queryEntity.setKeyType(Integer.class.getName());
> queryEntity.setValueType(Integer.class.getName());
> cfg.setCacheConfiguration(new CacheConfiguration<Integer, Integer>(CACHE)
> .setCacheMode(CacheMode.PARTITIONED)
> .setBackups(1)
> .setAffinity(new RendezvousAffinityFunction())
> .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
> .setPartitionLossPolicy(PartitionLossPolicy.READ_ONLY_SAFE)
> .setQueryEntities(Collections.singletonList(queryEntity)));
> DataStorageConfiguration storageCfg = new DataStorageConfiguration();
> storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
> cfg.setDataStorageConfiguration(storageCfg);
> return cfg;
> }
> {code}
> Query is expected to fail, but succeeds and returns entries from partitions that are alive.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)