Bug 1047905 - REPEATABLE_READ not working for AtomicMap and FineGrainedAtomicMap
Summary: REPEATABLE_READ not working for AtomicMap and FineGrainedAtomicMap
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: 6.2.1
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 1059774
TreeView+ depends on / blocked
 
Reported: 2014-01-02 14:36 UTC by Shay Matasaro
Modified: 2022-03-03 09:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When REPEATABLE_READ isolation mode is enabled, reading values from AtomicMap and FineGrainedAtomicMap is not consistent within the same transaction. If another thread changes the value during the transaction, the new value is reflected immediately in the current thread while the thread should still see the original value.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-3932 0 Major Resolved FineGrainedAtomicMap with REPEATABLE_READ sees modifications from other transactions 2018-05-17 13:31:13 UTC

Description Shay Matasaro 2014-01-02 14:36:21 UTC
Although REPEATABLE_READ is enabled , reading values from AtomicMap And FineGrainedAtomicMap is not consistent within the same transaction.

If another thread changes the value during the transaction, the new value is reflected immediately.

Comment 2 JBoss JIRA Server 2014-01-24 16:46:51 UTC
Pedro Ruivo <pruivo> updated the status of jira ISPN-3932 to Coding In Progress

Comment 3 Dan Berindei 2014-01-30 15:45:01 UTC
Pull request integrated: https://github.com/infinispan/jdg/pull/15

Comment 4 Shay Matasaro 2014-02-04 13:02:21 UTC
Hi Pedro,

I cherry-picked dafda103f77303c11683291111a76611eff9a832 (ispn-3932)into 6.2.0.ga, and the below test started failing
Does the test needs to be revised?

javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
    at org.infinispan.tx.totalorder.writeskew.DistTotalOrderL1WriteSkewTest.transactionCleanupWithWriteSkew(DistTotalOrderL1WriteSkewTest.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:715)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:907)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1237)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.infinispan.commons.CacheException: Could not prepare.
    at org.infinispan.transaction.synchronization.SynchronizationAdapter.beforeCompletion(SynchronizationAdapter.java:46)
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
    ... 22 more
Caused by: javax.transaction.xa.XAException
    at org.infinispan.transaction.TransactionCoordinator.prepare(TransactionCoordinator.java:139)
    at org.infinispan.transaction.TransactionCoordinator.prepare(TransactionCoordinator.java:101)
    at org.infinispan.transaction.synchronization.SynchronizationAdapter.beforeCompletion(SynchronizationAdapter.java:44)
    ... 27 more

Comment 5 Pedro Ruivo 2014-02-04 14:06:30 UTC
Hi Shay,

it shouldn't. The modifications are only for DeltaAware values (and atomic maps). Is it failing all the time? can you run that test with trace logs and send them to me?

Comment 6 Shay Matasaro 2014-02-04 20:47:55 UTC
when i enable traceTests, the GZ is not getting created , and I am getting the following error

~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests run: 3992, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 568.356 sec
log4j:ERROR Could not close org.apache.log4j.helpers.QuietWriter@773480e1
java.io.IOException: write beyond end of stream
	at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:201)
	at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:146)
	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
	at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
	at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
	at java.io.BufferedWriter.close(BufferedWriter.java:264)
	at java.io.FilterWriter.close(FilterWriter.java:104)
	at org.apache.log4j.FileAppender.closeFile(FileAppender.java:185)
	at org.apache.log4j.FileAppender.reset(FileAppender.java:343)
	at org.infinispan.util.logging.log4j.CompressedFileAppender.reset(CompressedFileAppender.java:47)
	at org.apache.log4j.WriterAppender.close(WriterAppender.java:207)
	at org.apache.log4j.helpers.AppenderAttachableImpl.removeAllAppenders(AppenderAttachableImpl.java:141)
	at org.apache.log4j.Category.removeAllAppenders(Category.java:891)
	at org.apache.log4j.Hierarchy.shutdown(Hierarchy.java:471)
	at org.apache.log4j.LogManager.shutdown(LogManager.java:267)
	at org.infinispan.util.logging.log4j.CompressedFileAppender$1.run(CompressedFileAppender.java:24)
	at java.lang.Thread.run(Thread.java:744)

Comment 7 Shay Matasaro 2014-02-04 21:30:46 UTC
Hi Pedro,

I wiped my env and redid all steps , all tests are for core are passing now :)



Cheers,
Shay


Note You need to log in before you can comment on or make changes to this bug.