Skip to content
  • Debarun Banerjee's avatar
    e27e0e0b
    BUG#21433768 NON-REPEATABLE READ WITH REPEATABLE READ ISOLATION LEVEL · e27e0e0b
    Debarun Banerjee authored
    
    
    Problem :
    ---------
    This issue is introduced by fix Bug #17320977 [rb#3982]. We are removing
    the transaction from trx_sys->rw_trx_ids after doing commit and
    releasing lock. This makes the order of removal of transaction from
    rw_trx_ids unpredictable.
    
    if a row is first updated by T1 and then by T2, it is possible that T2
    is removed from the list before T1. This would cause the
    ReadView/snapshot of a concurrent transaction to see changes made by T2
    but not T1 resulting in the inconsistency (reading part of the committed
    transaction T1 as the updates that are further updated by T2 are visible).
    
    Solution :
    ----------
    During commit, remove transaction from trx_sys->rw_trx_ids &
    trx_sys->serialisation_list before committing transaction in memory and
    releasing locks. This is essentially reverting back a part of the fix
    in rb#3982. This ensures the serialization order (in removal from trx
    id list) for transactions that operated on same row.
    
    Reviewed-by: default avatarSunny Bains <sunny.bains@oracle.com>
    Reviewed-by: default avatarAnnamalai Gurusami <Annamalai.Gurusami@oracle.com>
    
    RB: 9712
    e27e0e0b
    BUG#21433768 NON-REPEATABLE READ WITH REPEATABLE READ ISOLATION LEVEL
    Debarun Banerjee authored
    
    
    Problem :
    ---------
    This issue is introduced by fix Bug #17320977 [rb#3982]. We are removing
    the transaction from trx_sys->rw_trx_ids after doing commit and
    releasing lock. This makes the order of removal of transaction from
    rw_trx_ids unpredictable.
    
    if a row is first updated by T1 and then by T2, it is possible that T2
    is removed from the list before T1. This would cause the
    ReadView/snapshot of a concurrent transaction to see changes made by T2
    but not T1 resulting in the inconsistency (reading part of the committed
    transaction T1 as the updates that are further updated by T2 are visible).
    
    Solution :
    ----------
    During commit, remove transaction from trx_sys->rw_trx_ids &
    trx_sys->serialisation_list before committing transaction in memory and
    releasing locks. This is essentially reverting back a part of the fix
    in rb#3982. This ensures the serialization order (in removal from trx
    id list) for transactions that operated on same row.
    
    Reviewed-by: default avatarSunny Bains <sunny.bains@oracle.com>
    Reviewed-by: default avatarAnnamalai Gurusami <Annamalai.Gurusami@oracle.com>
    
    RB: 9712
Loading