[
https://issues.apache.org/jira/browse/IGNITE-5003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16721345#comment-16721345
]
Vyacheslav Koptilin edited comment on IGNITE-5003 at 12/14/18 12:29 PM:
------------------------------------------------------------------------
First of all, your test is good enough to be included in the {{examples}}
module I think. On the other hand, it can be simplified and placed into the
{{core}} module instead of {{spring}}.
It seems GridCacheWriteBehindStore.applyBatch() should aquire a readLock before
reading {{operation}} and {{status}}.
I couldn't find a way these fields can be modified in that case, but the
absence of readLock looks odd to me.
{code:java}
for (Map.Entry<K, StatefulValue<K, V>> e : valMap.entrySet()) {
if (operation == null)
operation = e.getValue().operation();
assert operation == e.getValue().operation();
assert e.getValue().status() == ValueStatus.PENDING;
batch.put(e.getKey(), e.getValue().entry());
}
{code}
Looks like {{load(key)}} should take into account {{val.nextVal}} and
{{val.nextStoreOperation}} in order to return the right value.
was (Author: slava.koptilin):
First of all, your test is good enough to be included in the {{examples}}
module I think. On the other hand, it can be simplified and placed into the
{{core}} module instead of {{spring}}.
It seems GridCacheWriteBehindStore.applyBatch() should aquire a readLock before
reading {{operation}} and {{status}}.
I couldn't find a way these fields can be modified in that case, but the
absence of readLosk looks odd to me.
{code:java}
for (Map.Entry<K, StatefulValue<K, V>> e : valMap.entrySet()) {
if (operation == null)
operation = e.getValue().operation();
assert operation == e.getValue().operation();
assert e.getValue().status() == ValueStatus.PENDING;
batch.put(e.getKey(), e.getValue().entry());
}
{code}
Looks like {{load(key)}} should take into account {{val.nextVal}} and
{{val.nextStoreOperation}} in order to return the right value.
> Parallel write&evict same key in CacheWriteBehindStore
> ------------------------------------------------------
>
> Key: IGNITE-5003
> URL: https://issues.apache.org/jira/browse/IGNITE-5003
> Project: Ignite
> Issue Type: Improvement
> Affects Versions: 1.9
> Reporter: Alexander Belyak
> Assignee: Andrey Aleksandrov
> Priority: Major
>
> Now GridCacheWriteBehindStore.updateCache wait for writeLock in StatefulValue
> and, moreover, waitForFlush() if value is in pending (flushing) state.
> We need to remove waiting.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)