The entry point looks like this
try(Ignite ignite = Ignition.start(getConfigFile())) {
IgniteTransactions txs = ignite.transactions();
IgniteCache<String, StagingRec> stagingCache =
ignite.getOrCreateCache("stagingCache");
IgniteCache<String, TargeRec> targetCache =
ignite.getOrCreateCache("targetCache");
//Sequence number for guid
IgniteAtomicSequence guidSeq = getGuidSeq(ignite, targetCache);
applicationService service = new
applicationService(targetCache, guidSeq);
//load staging
loadStaging(stagingCache);
//process staging data
SqlQuery<String,stagingRec> sqlStg = new
SqlQuery<>(StagingRec.class, getStagingSql());
try (QueryCursor<Cache.Entry<String, StagingRec>> cursor =
stagingCache.query(sqlStg)) {
for (Cache.Entry<String, StagingRec> e : cursor) {
Transaction tx =
txs.txStart(TransactionConcurrency.PESSIMISTIC,
TransactionIsolation.REPEATABLE_READ);
service.processStaging(e);
// stagingCache.remove(e.getKey()); //remove entry
from staging
tx.commit();
}
}
}catch (Exception e) {
e.printStackTrace();
}
In service.processStaging, the logic looks like this:
if (condition1) {
targetCache.put(key, value);
} else if (condition2) {
targetCache.remove(key, value);
targetCache.put(key2, value2);
}
Do you see anything that might be causing the issue?
On Fri, Apr 7, 2017 at 2:26 AM, Nikolai Tikhonov-2 [via Apache Ignite
Users] <[email protected]> wrote:
> Could you share code snippet which your benchmarked?
>
> On Fri, Apr 7, 2017 at 6:03 AM, waterg <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=11799&i=0>> wrote:
>
>> I have two caches. The application takes the first cache as input and
>> output value to the second cache.
>>
>> The first cache has readThrough only.
>>
>> Part of the configurations for second caches are below:
>>
>> <!-- Enable readThrough-->
>> <property name="readThrough" value="true"/>
>> <property name="writeThrough" value="true"/>
>> <property name="writeBehindEnabled" value="true"/>
>> <property name="writeBehindFlushSize" value="499"/>
>> <property name="WriteBehindFlushFrequency" value="0"/>
>> <property name="writeBehindFlushThreadCount" value="1"/>
>> <property name="writeBehindBatchSize" value="500"/>
>>
>> There are also two indexes on this cache.
>>
>> The other case is to set writeThrough and writeBehindEnabled to false. I
>> didn't change other settings.
>> Is there anything else that might be relevant to this case?
>>
>> Best,
>>
>>
>> On Thu, Apr 6, 2017 at 10:33 AM, Nikolai Tikhonov-2 [via Apache Ignite
>> Users] <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=11792&i=0>> wrote:
>>
>>> It's strange. Could you share your configuration for both case? Also
>>> could you describe more your case?
>>>
>>> On Wed, Apr 5, 2017 at 8:45 PM, waterg <[hidden email]
>>> <http:///user/SendEmail.jtp?type=node&node=11789&i=0>> wrote:
>>>
>>>> Thank you for the reply.
>>>> Yes, I disabled both write through and write behind.
>>>> We're trying evaluate the application's performance on ignite and by
>>>> taking
>>>> the persistent store out of equation, we thought the performance shall
>>>> improve, but on the contrary we saw performance dropped over 30%. What
>>>> would
>>>> explain this kind of behavior?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://apache-ignite-users.705
>>>> 18.x6.nabble.com/Disable-WriteBehind-tp11729p11763.html
>>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>> ------------------------------
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>> http://apache-ignite-users.70518.x6.nabble.com/Disable-Write
>>> Behind-tp11729p11789.html
>>> To unsubscribe from Disable WriteBehind, click here.
>>> NAML
>>> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>
>>
>> ------------------------------
>> View this message in context: Re: Disable WriteBehind
>> <http://apache-ignite-users.70518.x6.nabble.com/Disable-WriteBehind-tp11729p11792.html>
>>
>> Sent from the Apache Ignite Users mailing list archive
>> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Disable-
> WriteBehind-tp11729p11799.html
> To unsubscribe from Disable WriteBehind, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=11729&code=amVzc2llLmppYW53ZWkubGluQGdtYWlsLmNvbXwxMTcyOXwtOTM2MTAxMjg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Disable-WriteBehind-tp11729p11827.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.