[JBoss JIRA] (ISPN-3364) Tests from org.infinispan.atomic package fail with AssertionError
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-3364?page=com.atlassian.jira.plugin.... ]
William Burns edited comment on ISPN-3364 at 11/27/13 8:25 AM:
---------------------------------------------------------------
I was finally able to reproduce this in a way that I could debug to see what is going on. And needless to say that hasn't even helped.
In testing the ReplDeltaAwarePassivationTest I was able to narrow the culprit down to a single line where things were not working.
In BoundedConcurrentHashMap:1719 it is finally assigning the new entry to the array. For some reason this affects both the DataContainer and the DummyInMemoryCacheStore entries maps and ends up removing the additional element. Looking at all the references between the dc and store there is nothing shared in the map and doesn't make much sense as to why this occurs. I have tried changing the hash maps that are used in both the DataContainer and DummyStore to use different implementations respectively but it hasn't change the outcome either.
I haven't been able to debug fully the LocalDeltaAwarePassivationTest issue yet as it only is reproducible in a full maven run with all the tests.
was (Author: william.burns):
I was finally able to reproduce this in a way that I could debug to see what is going on. And needless to say that hasn't even helped.
In testing the ReplDeltaAwarePassivationTest I was able to narrow the culprit down to a single line where things were not working.
In BoundedConcurrentHashMap:1719 it is finally assigning the new entry to the array. For some reason this affects both the DataContainer and the DummyInMemoryCacheStore entries maps and ends up removing the additional element. Looking at all the references between the dc and store there is nothing shared in the map and doesn't make much sense as to why this occurs. I have tried changing the hash maps that are used in both the DataContainer and DummyStore to use different implementations respectively but it hasn't change the outcome either.
I haven't been able to reproduce the LocalDeltaAwarePassivationTest issue yet as it only is reproducible in a full maven run with all the tests.
> Tests from org.infinispan.atomic package fail with AssertionError
> -----------------------------------------------------------------
>
> Key: ISPN-3364
> URL: https://issues.jboss.org/browse/ISPN-3364
> Project: Infinispan
> Issue Type: Bug
> Components: Core API
> Affects Versions: 6.0.0.Alpha1
> Environment: RHEL5_x86, RHEL5_x86_64, RHEL6_x86, RHEL5_x86_64 with IBM JDK7
> Reporter: Vitalii Chepeliuk
> Assignee: William Burns
> Labels: 620
> Attachments: LocalDeltaAwarePassivationTest.log.zip, ReplDeltaAwarePassivationTest.log.zip
>
>
> Following tests fail from org.infinispan.atomic package
> org.infinispan.atomic.LocalDeltaAwarePassivationTest.testAtomicMap
> org.infinispan.atomic.LocalDeltaAwarePassivationTest.testDeltaAware
> org.infinispan.atomic.LocalDeltaAwarePassivationTest.testFineGrainedAtomicMap
> org.infinispan.atomic.ReplDeltaAwarePassivationTest.testAtomicMap
> org.infinispan.atomic.ReplDeltaAwarePassivationTest.testAtomicMap2
> org.infinispan.atomic.ReplDeltaAwarePassivationTest.testDeltaAware
> org.infinispan.atomic.ReplDeltaAwarePassivationTest.testDeltaAware2
> org.infinispan.atomic.ReplDeltaAwarePassivationTest.testFineGrainedAtomicMap
> org.infinispan.atomic.ReplDeltaAwarePassivationTest.testFineGrainedAtomicMap2
> Add link on jenkins job https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/JDG/view/FUNC/job/e...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on adding WriteSkew functional to our project, but unfortunately it's not working as we expected.
We use infinispan like a cache for mongoDb data source, but this situation doesn't depends on data source vendor.
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it's not found -> load element from data source -> put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx -> WriteSkewException
here is my log:
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
TX BEGIN. tx_status=6, thread=1
SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When you invoke "get" method with key that not available in cache, infinispan create an "null" element in cache. This element won't be updated by putForExternalRead method (look at log above). If you skip "get" method invocation everithing will work fine. By the way, everithing is working fine if you skip "step 2" of the scenario.
I use workaround for this situation. I check if element exist in the cache not by "containsKey" or "get" method but via cache.keySet().contains(key)
This works ok
I'm looking forward for you comments, maybe I'm doing something wrong.
Thanks
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
TX BEGIN. tx_status=6, thread=1
SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
4) make some modification with element -> put element to cache -> commit tx -> WriteSkewException
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on adding WriteSkew functional to our project, but unfortunately it's not working as we expected.
> We use infinispan like a cache for mongoDb data source, but this situation doesn't depends on data source vendor.
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it's not found -> load element from data source -> put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx -> WriteSkewException
> here is my log:
> TX BEGIN tx_status=6 thread=1
> PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
> TX COMMIT tx_status=0 thread=1
> TX BEGIN. tx_status=6, thread=1
> SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
> PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
> PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
> TX COMMIT status=0 thread=1
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When you invoke "get" method with key that not available in cache, infinispan create an "null" element in cache. This element won't be updated by putForExternalRead method (look at log above). If you skip "get" method invocation everithing will work fine. By the way, everithing is working fine if you skip "step 2" of the scenario.
> I use workaround for this situation. I check if element exist in the cache not by "containsKey" or "get" method but via cache.keySet().contains(key)
> This works ok
> I'm looking forward for you comments, maybe I'm doing something wrong.
> Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
TX BEGIN. tx_status=6, thread=1
SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
4) make some modification with element -> put element to cache -> commit tx -> WriteSkewException
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
TX BEGIN. tx_status=6, thread=1
SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> TX BEGIN tx_status=6 thread=1
> PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
> TX COMMIT tx_status=0 thread=1
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> TX BEGIN. tx_status=6, thread=1
> SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
> PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
> 4) make some modification with element -> put element to cache -> commit tx -> WriteSkewException
> PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
> TX COMMIT status=0 thread=1
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
TX BEGIN. tx_status=6, thread=1
SIZE id=key1, tx_status=0, thread='1' size='1', contains='{ key: null }'
PUT_FOR_EXTERANL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN status=6 thread=1
PUT id=key1, tx=0, thread=1 cache size=1, cache contains=key:key1, value:value
TX COMMIT. status='0', thread='1'
TX BEGIN. status='6', thread='1'
SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx
> Commit operation throws WriteSkewException
> Here is log:
> TX BEGIN tx_status=6 thread=1
> PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
> TX COMMIT tx_status=0 thread=1
> TX BEGIN. tx_status=6, thread=1
> SIZE id=key1, tx_status=0, thread='1' size='1', contains='{ key: null }'
> PUT_FOR_EXTERANL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
> PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
> TX COMMIT status=0 thread=1
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
TX BEGIN. tx_status=6, thread=1
SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
PUT_FOR_EXTERANL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
TX BEGIN. tx_status=6, thread=1
SIZE id=key1, tx_status=0, thread='1' size='1', contains='{ key: null }'
PUT_FOR_EXTERANL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx
> Commit operation throws WriteSkewException
> Here is log:
> TX BEGIN tx_status=6 thread=1
> PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
> TX COMMIT tx_status=0 thread=1
> TX BEGIN. tx_status=6, thread=1
> SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
> PUT_FOR_EXTERANL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
> PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
> TX COMMIT status=0 thread=1
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
TX BEGIN. tx_status=6, thread=1
SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN tx_status=6 thread=1
PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
TX COMMIT tx_status=0 thread=1
TX BEGIN. tx_status=6, thread=1
SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
PUT_FOR_EXTERANL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
TX COMMIT status=0 thread=1
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx
> Commit operation throws WriteSkewException
> Here is log:
> TX BEGIN tx_status=6 thread=1
> PUT id=key1, tx_status=0, thread=1 cache_size=1, cache_ contains=key:key1, value:value
> TX COMMIT tx_status=0 thread=1
> TX BEGIN. tx_status=6, thread=1
> SIZE id=key1 tx_status=0, thread=1 cache_size=1 contains=key:key1, value:null
> PUT_FOR_EXTERNAL_READ id=key1, tx_status=0 thread=1 cache_size=1 cache_contains=key:key1, value:null
> PUT id=key1 tx_status=0 thread=1 cache_size=1 contains=key:key1, value:value
> TX COMMIT status=0 thread=1
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN status=6 thread=1
PUT id=key1, tx=0, thread=1 cache size=1, cache contains={ key1:value }
TX COMMIT. status='0', thread='1'
TX BEGIN. status='6', thread='1'
SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN. status='6', thread='1'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
TX BEGIN. status='6', thread='1'
SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx
> Commit operation throws WriteSkewException
> Here is log:
> TX BEGIN status=6 thread=1
> PUT id=key1, tx=0, thread=1 cache size=1, cache contains={ key1:value }
> TX COMMIT. status='0', thread='1'
> TX BEGIN. status='6', thread='1'
> SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
> PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
> PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
> TX COMMIT. status='0', thread='1'
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN status=6 thread=1
PUT id=key1, tx=0, thread=1 cache size=1, cache contains=key:key1, value:value
TX COMMIT. status='0', thread='1'
TX BEGIN. status='6', thread='1'
SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN status=6 thread=1
PUT id=key1, tx=0, thread=1 cache size=1, cache contains={ key1:value }
TX COMMIT. status='0', thread='1'
TX BEGIN. status='6', thread='1'
SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx
> Commit operation throws WriteSkewException
> Here is log:
> TX BEGIN status=6 thread=1
> PUT id=key1, tx=0, thread=1 cache size=1, cache contains=key:key1, value:value
> TX COMMIT. status='0', thread='1'
> TX BEGIN. status='6', thread='1'
> SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
> PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
> PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
> TX COMMIT. status='0', thread='1'
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Attachment: InfinispanTest.java
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
> Attachments: InfinispanTest.java
>
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx
> Commit operation throws WriteSkewException
> Here is log:
> TX BEGIN. status='6', thread='1'
> PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
> TX COMMIT. status='0', thread='1'
> TX BEGIN. status='6', thread='1'
> SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
> PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
> PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
> TX COMMIT. status='0', thread='1'
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (ISPN-3766) WriteSkewException
by V L (JIRA)
[ https://issues.jboss.org/browse/ISPN-3766?page=com.atlassian.jira.plugin.... ]
V L updated ISPN-3766:
----------------------
Description:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN. status='6', thread='1'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
TX BEGIN. status='6', thread='1'
SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
TX COMMIT. status='0', thread='1'
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
was:
I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
We use infinispan like a "cache" for some data source (doesn't matter for what)
The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
1) begin tx -> create an new element -> commit tx.
2) wait until cache expires. cache is empty now
3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
4) make some modification with element -> put element to cache -> commit tx
Commit operation throws WriteSkewException
Here is log:
TX BEGIN. status='6', thread='1'
PUT id='1', tx='0', thread='1' size='1', contains='{ 1/value }'
TX COMMIT. status='0', thread='1'
TX BEGIN. status='6', thread='1'
SIZE id='1', tx='0', thread='1' size='1', contains='{ 1/null }'
PUT_FER id='1', tx='0', thread='1' size='1', contains='{ 1/null }'
PUT id='1', tx='0', thread='1' size='1', contains='{ 1/value }'
TX COMMIT. status='0', thread='1'
ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
> WriteSkewException
> -------------------
>
> Key: ISPN-3766
> URL: https://issues.jboss.org/browse/ISPN-3766
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.CR1, 6.0.0.Final
> Reporter: V L
> Assignee: Mircea Markus
>
> I'm not new with Infinispan, we use it from 5.3 version. Now I'm working on integrating WriteSkew functional in our project, but unfortunately it's not worked properly in our situation.
> We use infinispan like a "cache" for some data source (doesn't matter for what)
> The problem is that WriteSkewException is available in specific situation, here are steps for reproducing:
> 1) begin tx -> create an new element -> commit tx.
> 2) wait until cache expires. cache is empty now
> 3) being tx -> try to get element from cache, but it isn't found, so loading element from data source and put it to the cache via putForExternalRead for read access outside of current transaction.
> 4) make some modification with element -> put element to cache -> commit tx
> Commit operation throws WriteSkewException
> Here is log:
> TX BEGIN. status='6', thread='1'
> PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
> TX COMMIT. status='0', thread='1'
> TX BEGIN. status='6', thread='1'
> SIZE id='1', tx='0', thread='1' size='1', contains='{ key: null }'
> PUT_FER id='1', tx='0', thread='1' size='1', contains='{ key:null }'
> PUT id='1', tx='0', thread='1' size='1', contains='{ key:value }'
> TX COMMIT. status='0', thread='1'
> ISPN000005: Detected write skew on key [1]. Another process has changed the entry since we last read it! Unable to copy entry for update.
> Exception executing call org.infinispan.transaction.WriteSkewException: Detected write skew.
> I think I found the problem is in "get" method. When I invoke the get method with key that not available in cache, infinispan create an "null" element in cache. This element doesn't update by putForExternalRead method (look at log above). If you skip get method invocation everithing is working fine. Everithing is working ok if you skip step 2 of scenarion too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months