[JBoss JIRA] (ISPN-4777) Replace command not atomic in REPL_SYNC cache mode
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-4777?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes reassigned ISPN-4777:
---------------------------------------
Assignee: Gustavo Fernandes
> Replace command not atomic in REPL_SYNC cache mode
> --------------------------------------------------
>
> Key: ISPN-4777
> URL: https://issues.jboss.org/browse/ISPN-4777
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 5.2.6.Final
> Reporter: Anuj Shah
> Assignee: Gustavo Fernandes
> Attachments: ReaderLockerTest.java
>
>
> This problem was discovered using the Lucene InfinispanDirectory with DistributedSegmentReadLocker. We found after a while of production usage that some Lucene files were randomly removed from the caches, but remained in the file listing entry, which resulted in an unusable index.
> We managed to replicate the problem in a test that acquires and releases read lock concurrently and checks for file deletion. We found this fails quickly when using REPL_SYNC mode, but runs for a while with DIST_SYNC.
> Some extra logging indicated that the replace command used to increment the lock counter across multiple cluster members, results in an single increment when called concurrently, with both calls reporting success. This eventually causes the file deletion, as we have now mis-counted the number of readers. We also observed the opposite effect of the counter only decrementing by one when releasing.
> Our conclusion is that the replace command fails atomicity when in REPL_SYNC mode, but works in other modes, we tried DIST_SYNC, DIST_ASYNC and REPL_ASYNC.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5685) Filtering doesn't work with sum aggregation
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5685?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5685:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/3668
> Filtering doesn't work with sum aggregation
> -------------------------------------------
>
> Key: ISPN-5685
> URL: https://issues.jboss.org/browse/ISPN-5685
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 8.0.0.Beta3
> Reporter: Jakub Markos
> Assignee: Adrian Nistor
> Fix For: 8.0.0.Final
>
>
> The following query
> {code}
> public void testGroupBy() {
> QueryFactory qf = getQueryFactory();
> Query q = qf.from(getModelFactory().getTransactionImplClass())
> .select(Expression.property("accountId"), Expression.sum("amount"))
> .groupBy("accountId")
> .having(Expression.sum("amount")).gt(3324)
> .toBuilder().build();
> }
> {code}
> in the context of QueryDslConditionsTest test class fails with:
> {code}
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
> at java.lang.Double.compareTo(Double.java:49)
> at org.infinispan.objectfilter.impl.util.Interval.contains(Interval.java:92)
> at org.infinispan.objectfilter.impl.predicateindex.IntervalCondition.match(IntervalCondition.java:19)
> at org.infinispan.objectfilter.impl.predicateindex.IntervalCondition.match(IntervalCondition.java:9)
> at org.infinispan.objectfilter.impl.predicateindex.Predicate.match(Predicate.java:37)
> at org.infinispan.objectfilter.impl.predicateindex.Predicates.notifyMatchingSubscribers(Predicates.java:118)
> at org.infinispan.objectfilter.impl.predicateindex.AttributeNode.processValue(AttributeNode.java:112)
> at org.infinispan.objectfilter.impl.predicateindex.RowMatcherEvalContext.processAttributes(RowMatcherEvalContext.java:30)
> at org.infinispan.objectfilter.impl.predicateindex.MatcherEvalContext.process(MatcherEvalContext.java:120)
> at org.infinispan.objectfilter.impl.ObjectFilterImpl.filter(ObjectFilterImpl.java:73)
> at org.infinispan.query.dsl.embedded.impl.HybridQuery$1.update(HybridQuery.java:75)
> at org.infinispan.query.dsl.embedded.impl.HybridQuery$1.hasNext(HybridQuery.java:56)
> at org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.listInternal(BaseEmbeddedQuery.java:72)
> at org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.list(BaseEmbeddedQuery.java:63)
> at org.infinispan.query.dsl.embedded.QueryDslConditionsTest.testGroupBy(QueryDslConditionsTest.java:1811)
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5691) Server should enable writeSkew for some configurations by default
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-5691?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-5691:
----------------------------------------
Integrated in master but not 7.2.x since it does not apply cleanly. A PR is needed for 7.2.x.
> Server should enable writeSkew for some configurations by default
> -----------------------------------------------------------------
>
> Key: ISPN-5691
> URL: https://issues.jboss.org/browse/ISPN-5691
> Project: Infinispan
> Issue Type: Enhancement
> Components: Server
> Reporter: Galder Zamarreño
> Assignee: Tristan Tarrant
> Fix For: 8.0.0.Final, 7.2.5.Final
>
>
> By default, optimistic locking caches do not enable write skew. This was already spotted in ISPN-3655.
> In an embedded environment, the user can always enable write skew in its configuration, but this cannot be enabled in server mode.
> Widlfly does enable write skew programmatically depending on the configuration:
> {quote}
> > hey, quick q: can you configure writeSkew on infinispan wildfly
> config?
> <pferraro> we always enable write skew for synchronous, optimistic,
> repeatable-read caches, and disable otherwise
> > pferraro: ah, you do it in the integration code?
> <pferraro> yes
> {quote}
> We need to be doing the same in server configuration, otherwise we run the risk of having issues with conditional operations under failure situations (see ISPN-2956)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5695) Number of entities indexes in Multi node Distributed cache not correct
by Prashant Thakur (JIRA)
[ https://issues.jboss.org/browse/ISPN-5695?page=com.atlassian.jira.plugin.... ]
Prashant Thakur updated ISPN-5695:
----------------------------------
Steps to Reproduce:
1. Create a distributed Cache with 1 million entries
2. Provide the configuration as given below in xml file
<distributed-cache name="SUBSCRIBER" mode="SYNC" owners="2" segments="100" capacity="1" l1-lifespan="0" remote-timeout="864000000">
<locking acquire-timeout="20000" write-skew="false" concurrency-level="500" striping="false" />
<custom-interceptors>
<interceptor after="org.infinispan.interceptors.compat.TypeConverterInterceptor" class="com.subex.spark.common.distributedcaching.server.interceptors.LastModifiedDateInterceptor"/>
</custom-interceptors>
<transaction transaction-manager-lookup="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" mode="NON_XA" locking="OPTIMISTIC"/>
<state-transfer timeout="480000" enabled="true" />
</distributed-cache>
<!-- *************************************** -->
<!-- Cache to store Lucene's file metadata -->
<!-- *************************************** -->
<replicated-cache name="LuceneIndexesMetadata" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
<!-- **************************** -->
<!-- Cache to store Lucene data -->
<!-- **************************** -->
<distributed-cache name="LuceneIndexesData" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</distributed-cache>
<!-- ***************************** -->
<!-- Cache to store Lucene locks -->
<!-- ***************************** -->
<replicated-cache name="LuceneIndexesLocking" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
3. Provide following configuration in program
SearchMapping mapping = new SearchMapping();
mapping.entity(classType).indexed().providedId() ;
Properties props = new Properties();
props.put(org.hibernate.search.cfg.Environment.MODEL_MAPPING, mapping);
props.put("hibernate.search.default.directory_provider", "infinispan");
props.put("hibernate.search.default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager");
props.put("hibernate.search.default.exclusive_index_use", "false");
props.put("hibernate.search.default.indexwriter.merge_factor","30");
props.put("hibernate.search.default.indexwriter.merge_max_size", "50000");
props.put("hibernate.search.default.indexwriter.max_merge_docs", "6000000");
props.put("hibernate.search.default.indexwriter.ram_buffer_size", "512");
6);
props.put("hibernate.search.default.max_queue_length", "1000000");
props.put("hibernate.search.default.worker.execution", "async");
props.put("hibernate.search.default.worker.thread_pool.size", "6");
props.put("hibernate.search.default.chunk_size", 128000);
configurationBuilder.indexing().index(Index.LOCAL).autoConfig(true).withProperties(props);
4. Run Index Writer from JConsole and check the count of entities indexed
5. Run Index Writer again from JConsole and take another screen shot for entities indexed.
6. The numbers taken are inconsistent each time we run index manager
7. Expected behaviour is numbers should remain change with each run of index manager
was:
1. Create a distributed Cache with 1 million entries
2. Provide the configuration as given below in xml file
<distributed-cache name="SUBSCRIBER" mode="SYNC" owners="2" segments="100" capacity="1" l1-lifespan="0" remote-timeout="864000000">
<locking acquire-timeout="20000" write-skew="false" concurrency-level="500" striping="false" />
<custom-interceptors>
<interceptor after="org.infinispan.interceptors.compat.TypeConverterInterceptor" class="com.subex.spark.common.distributedcaching.server.interceptors.LastModifiedDateInterceptor"/>
</custom-interceptors>
<transaction transaction-manager-lookup="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" mode="NON_XA" locking="OPTIMISTIC"/>
<state-transfer timeout="480000" enabled="true" />
</distributed-cache>
<!-- *************************************** -->
<!-- Cache to store Lucene's file metadata -->
<!-- *************************************** -->
<replicated-cache name="LuceneIndexesMetadata" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
<!-- **************************** -->
<!-- Cache to store Lucene data -->
<!-- **************************** -->
<distributed-cache name="LuceneIndexesData" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</distributed-cache>
<!-- ***************************** -->
<!-- Cache to store Lucene locks -->
<!-- ***************************** -->
<replicated-cache name="LuceneIndexesLocking" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
3. Provide following configuration in program
SearchMapping mapping = new SearchMapping();
mapping.entity(classType).indexed().providedId() ;
Properties props = new Properties();
props.put(org.hibernate.search.cfg.Environment.MODEL_MAPPING, mapping);
props.put("hibernate.search.default.directory_provider", "infinispan");
props.put("hibernate.search.default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager");
props.put("hibernate.search.default.exclusive_index_use", "false");
props.put("hibernate.search.default.indexwriter.merge_factor","30");
props.put("hibernate.search.default.indexwriter.merge_max_size", "50000");
props.put("hibernate.search.default.indexwriter.max_merge_docs", "6000000");
props.put("hibernate.search.default.indexwriter.ram_buffer_size", "512");
6);
props.put("hibernate.search.default.max_queue_length", "1000000");
props.put("hibernate.search.default.worker.execution", "async");
props.put("hibernate.search.default.worker.thread_pool.size", "6");
props.put("hibernate.search.default.chunk_size", 128000);
configurationBuilder.indexing().index(Index.LOCAL).autoConfig(true).withProperties(props);
4. Run INdex Writer from JConsole and check the count of entities indexed
5. Run Index Writer again from JConsole and take another screen shot for entities indexed.
6. The numbers taken are inconsistent each time we run index manager
7. Expected behaviour is numbers should remain change with each run of index manager
> Number of entities indexes in Multi node Distributed cache not correct
> ----------------------------------------------------------------------
>
> Key: ISPN-5695
> URL: https://issues.jboss.org/browse/ISPN-5695
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying, Remote Querying
> Affects Versions: 8.0.0.Beta3
> Environment: CentOS
> Reporter: Prashant Thakur
> Attachments: instance1.png, instance2.png
>
>
> When we configure 3 node cluster we are observing a different number of entities being indexed each time we run IndexWriter Instance with cache data remaining the same.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5695) Number of entities indexes in Multi node Distributed cache not correct
by Prashant Thakur (JIRA)
[ https://issues.jboss.org/browse/ISPN-5695?page=com.atlassian.jira.plugin.... ]
Prashant Thakur updated ISPN-5695:
----------------------------------
Steps to Reproduce:
1. Create a distributed Cache with 1 million entries
2. Provide the configuration as given below in xml file
<distributed-cache name="SUBSCRIBER" mode="SYNC" owners="2" segments="100" capacity="1" l1-lifespan="0" remote-timeout="864000000">
<locking acquire-timeout="20000" write-skew="false" concurrency-level="500" striping="false" />
<custom-interceptors>
<interceptor after="org.infinispan.interceptors.compat.TypeConverterInterceptor" class="com.subex.spark.common.distributedcaching.server.interceptors.LastModifiedDateInterceptor"/>
</custom-interceptors>
<transaction transaction-manager-lookup="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" mode="NON_XA" locking="OPTIMISTIC"/>
<state-transfer timeout="480000" enabled="true" />
</distributed-cache>
<!-- *************************************** -->
<!-- Cache to store Lucene's file metadata -->
<!-- *************************************** -->
<replicated-cache name="LuceneIndexesMetadata" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
<!-- **************************** -->
<!-- Cache to store Lucene data -->
<!-- **************************** -->
<distributed-cache name="LuceneIndexesData" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</distributed-cache>
<!-- ***************************** -->
<!-- Cache to store Lucene locks -->
<!-- ***************************** -->
<replicated-cache name="LuceneIndexesLocking" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
3. Provide following configuration in program
SearchMapping mapping = new SearchMapping();
mapping.entity(classType).indexed().providedId() ;
Properties props = new Properties();
props.put(org.hibernate.search.cfg.Environment.MODEL_MAPPING, mapping);
props.put("hibernate.search.default.directory_provider", "infinispan");
props.put("hibernate.search.default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager");
props.put("hibernate.search.default.exclusive_index_use", "false");
props.put("hibernate.search.default.indexwriter.merge_factor","30");
props.put("hibernate.search.default.indexwriter.merge_max_size", "50000");
props.put("hibernate.search.default.indexwriter.max_merge_docs", "6000000");
props.put("hibernate.search.default.indexwriter.ram_buffer_size", "512");
6);
props.put("hibernate.search.default.max_queue_length", "1000000");
props.put("hibernate.search.default.worker.execution", "async");
props.put("hibernate.search.default.worker.thread_pool.size", "6");
props.put("hibernate.search.default.chunk_size", 128000);
configurationBuilder.indexing().index(Index.LOCAL).autoConfig(true).withProperties(props);
4. Run INdex Writer from JConsole and check the count of entities indexed
5. Run Index Writer again from JConsole and take another screen shot for entities indexed.
6. The numbers taken are inconsistent each time we run index manager
7. Expected behaviour is numbers should remain change with each run of index manager
was:
1. Create a distributed Cache with 1 million entries
2. Provide the configuration as given below in xml file
<distributed-cache name="SUBSCRIBER" mode="SYNC" owners="2" segments="100" capacity="1" l1-lifespan="0" remote-timeout="864000000">
<locking acquire-timeout="20000" write-skew="false" concurrency-level="500" striping="false" />
<custom-interceptors>
<interceptor after="org.infinispan.interceptors.compat.TypeConverterInterceptor" class="com.subex.spark.common.distributedcaching.server.interceptors.LastModifiedDateInterceptor"/>
</custom-interceptors>
<transaction transaction-manager-lookup="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" mode="NON_XA" locking="OPTIMISTIC"/>
<state-transfer timeout="480000" enabled="true" />
</distributed-cache>
<!-- *************************************** -->
<!-- Cache to store Lucene's file metadata -->
<!-- *************************************** -->
<replicated-cache name="LuceneIndexesMetadata" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
<!-- **************************** -->
<!-- Cache to store Lucene data -->
<!-- **************************** -->
<distributed-cache name="LuceneIndexesData" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</distributed-cache>
<!-- ***************************** -->
<!-- Cache to store Lucene locks -->
<!-- ***************************** -->
<replicated-cache name="LuceneIndexesLocking" mode="SYNC" remote-timeout="864000000">
<state-transfer enabled="true" />
<indexing index="NONE" />
</replicated-cache>
3. Provide following configuration in program
SearchMapping mapping = new SearchMapping();
mapping.entity(classType).indexed().providedId() ;
Properties props = new Properties();
props.put(org.hibernate.search.cfg.Environment.MODEL_MAPPING, mapping);
props.put("hibernate.search.default.directory_provider", "infinispan");
props.put("hibernate.search.default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager");
props.put("hibernate.search.default.exclusive_index_use", "false");
// props.put("hibernate.search.default.locking_strategy", "none");
props.put("hibernate.search.default.indexwriter.merge_factor","30");
props.put("hibernate.search.default.indexwriter.merge_max_size", "50000");
props.put("hibernate.search.default.indexwriter.max_merge_docs", "6000000");
// props.put("hibernate.search.default.worker.backend", "jgroups");
//props.put("hibernate.search.default.indexwriter.merge_max_size", 50000);
props.put("hibernate.search.default.indexwriter.ram_buffer_size", "512");
// props.put("hibernate.search.default.sharding_strategy.nbr_of_shards", 6);
props.put("hibernate.search.default.max_queue_length", "1000000");
props.put("hibernate.search.default.worker.execution", "async");
props.put("hibernate.search.default.worker.thread_pool.size", "6");
props.put("hibernate.search.default.chunk_size", 128000);
// props.put("hibernate.search.default.reader.strategy", "shared");
// props.put("hibernate.search.default.locking_strategy", "native");
// props.put("hibernate.search.default.exclusive_index_use", "false");
// org.apache.lucene.index.IndexWriterConfig.WRITE_LOCK_TIMEOUT=5000;
// org.apache.lucene.store.Lock.LOCK_POLL_INTERVAL=10;
configurationBuilder.indexing().index(Index.LOCAL).autoConfig(true).withProperties(props);
4. Run INdex Writer from JConsole and check the count of entities indexed
5. Run Index Writer again from JConsole and take another screen shot for entities indexed.
6. The numbers taken are inconsistent each time we run index manager
7. Expected behaviour is numbers should remain change with each run of index manager
> Number of entities indexes in Multi node Distributed cache not correct
> ----------------------------------------------------------------------
>
> Key: ISPN-5695
> URL: https://issues.jboss.org/browse/ISPN-5695
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying, Remote Querying
> Affects Versions: 8.0.0.Beta3
> Environment: CentOS
> Reporter: Prashant Thakur
> Attachments: instance1.png, instance2.png
>
>
> When we configure 3 node cluster we are observing a different number of entities being indexed each time we run IndexWriter Instance with cache data remaining the same.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5695) Number of entities indexes in Multi node Distributed cache not correct
by Prashant Thakur (JIRA)
Prashant Thakur created ISPN-5695:
-------------------------------------
Summary: Number of entities indexes in Multi node Distributed cache not correct
Key: ISPN-5695
URL: https://issues.jboss.org/browse/ISPN-5695
Project: Infinispan
Issue Type: Bug
Components: Embedded Querying, Remote Querying
Affects Versions: 8.0.0.Beta3
Environment: CentOS
Reporter: Prashant Thakur
Attachments: instance1.png, instance2.png
When we configure 3 node cluster we are observing a different number of entities being indexed each time we run IndexWriter Instance with cache data remaining the same.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months