[infinispan-issues] [JBoss JIRA] (ISPN-7505) Non-functional read in transaction with modifications returns old value

Radim Vansa (JIRA) issues at jboss.org
Wed Feb 22 04:07:00 EST 2017


     [ https://issues.jboss.org/browse/ISPN-7505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radim Vansa updated ISPN-7505:
------------------------------
    Affects Version/s: 9.0.0.CR1


> Non-functional read in transaction with modifications returns old value
> -----------------------------------------------------------------------
>
>                 Key: ISPN-7505
>                 URL: https://issues.jboss.org/browse/ISPN-7505
>             Project: Infinispan
>          Issue Type: Bug
>    Affects Versions: 9.0.0.CR1
>            Reporter: Radim Vansa
>            Assignee: Radim Vansa
>
> See this modified FunctionalTxInMemoryTest:
> {code:java}
>    @Test(dataProvider = "owningModeAndReadWrites")
>    public void testReadWriteAfterMods(boolean isOwner, WriteMethod method) throws Exception {
>       Object KEY = getKey(isOwner);
>       cache(0, DIST).put(KEY, "a");
>       tm.begin();
>       assertEquals("a", rw.eval(KEY, append("b")).join());
>       assertEquals("ab", rw.evalMany(Collections.singleton(KEY), append("c")).findAny().get());
>       assertEquals("abc", cache(0, DIST).get(KEY)); // <-- THIS FAILS
>       assertEquals(null, rw.eval("otherKey", append("d")).join());
>       assertEquals("abc", method.action.eval(KEY, wo, rw,
>             MarshallableFunctions.returnReadOnlyFindOrNull(),
>             (BiConsumer<EntryView.WriteEntryView<String>, String> & Serializable) (e, prev) -> {}, getClass()));
>       tm.commit();
>    }
> {code}
> When the entry was modified in given transaction, we have to do the read using functional identity read which passes all modifications along. We need to do this for all {{remoteGet}} s, including those invoked for {{putIfAbsent}} etc.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list