br1ghtyang / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Incorrect logic in rollback --> StackOverlfowError #543

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Observed on a private branch using a TwitterFireHose adaptor. 
 TwitterFireHose adaptor simulates a "push" based feed with tweets arriving at a configurable TPS (tweets per second). 
2. Feed ingestion activity throws DuplicatKeyException and triggers a rollback. 
3. Roll back fails with...

Jun 25, 2013 11:17:35 AM 
edu.uci.ics.asterix.transaction.management.service.recovery.RecoveryManager 
rollbackTransaction
INFO:  rollbacking transaction log records from 0 to 39423
Jun 25, 2013 11:17:35 AM 
edu.uci.ics.asterix.transaction.management.service.recovery.RecoveryManager 
rollbackTransaction
INFO:  collecting loser transaction's LSNs from 0 to 39423
Exception in thread "Thread-1" java.lang.StackOverflowError
    at java.util.concurrent.atomic.AtomicInteger.compareAndSet(AtomicInteger.java:135)
    at java.util.concurrent.atomic.AtomicInteger.addAndGet(AtomicInteger.java:235)
    at edu.uci.ics.asterix.common.transactions.LogicalLogLocator.increaseMemoryOffset(LogicalLogLocator.java:65)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:114)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)
    at edu.uci.ics.asterix.transaction.management.service.logging.LogCursor.next(LogCursor.java:125)

What is the expected output? What do you see instead?
Roll back should succeed.

Please use labels and text to provide additional information.
As per discussion with YS, this requires a critical fix in the master branch. 

Original issue reported on code.google.com by RamanGro...@gmail.com on 25 Jun 2013 at 10:41

GoogleCodeExporter commented 8 years ago

Original comment by kiss...@gmail.com on 11 Oct 2013 at 12:28