Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7505

Non-functional read in transaction with modifications returns old value

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 9.0.0.CR1
    • Fix Version/s: 9.0.0.CR3
    • Component/s: Core
    • Labels:
      None

      Description

      See this modified FunctionalTxInMemoryTest:

         @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();
         }
      

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rvansa Radim Vansa
                  Reporter:
                  rvansa Radim Vansa
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: