[ 
https://issues.apache.org/jira/browse/IGNITE-26411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Pligin updated IGNITE-26411:
-------------------------------------
    Description: 
Looks like some tests are not using the following StorageUpdateHandler methods 
correctly:
 * handleUpdate(...)
 * handleUpdateAll(...)

This means that the following parameter set invariant is violated:
{code:java}
assert trackWriteIntent || commitTs != null
{code}
When writing data to storage, two main situations are possible.
 # The transaction is complete - the transaction is committed (in this case, 
commitTs != null)
 # The transaction is not complete - changes are accumulated (in this case, 
trackWriteIntent=true)

However, the following tests pass commitTs=null along with 
trackWriteIntent=false
 * StorageCleanupTest.testCleanupBeforeUpdateNoData
 * StorageCleanupTest.testCleanupAndUpdateRowBatch
 * StorageCleanupTest.testCleanupAndUpdateRow

 * IndexGcTest.testRemoveTombstonesRowRowNull
 * IndexGcTest.testRemoveStaleEntriesWithDifferentIndexes
 * IndexGcTest.testRemoveTombstonesRowNullRow
 * IndexGcTest.testRemoveTombstonesRowNullNull
 * IndexGcTest.testRemoveStaleEntryWithSameIndex

This is inconvenient and can lead to errors in the future, since it requires 
adding special checks in production code (IGNITE-26067) for the scenarios that 
are not possible in production.  

  was:
Looks like some tests are not using the following StorageUpdateHandler methods 
correctly:
 * handleUpdate(...)
 * handleUpdateAll(...)

This means that the following parameter set invariant is violated:
{code:java}
assert trackWriteIntent || commitTs != null
{code}
When writing data to storage, two main situations are possible.
 # The transaction is complete - the transaction is committed (in this case, 
commitTs != null)
 # The transaction is not complete - changes are accumulated (in this case, 
trackWriteIntent=true)

However, the following tests pass commitTs=null along with 
trackWriteIntent=false
 * StorageCleanupTest.testCleanupBeforeUpdateNoData
 * StorageCleanupTest.testCleanupAndUpdateRowBatch
 * StorageCleanupTest.testCleanupAndUpdateRow

 * IndexGcTest.testRemoveTombstonesRowRowNull
 * IndexGcTest.testRemoveStaleEntriesWithDifferentIndexes
 * IndexGcTest.testRemoveTombstonesRowNullRow
 * IndexGcTest.testRemoveTombstonesRowNullNull
 * IndexGcTest.testRemoveStaleEntryWithSameIndex

This is inconvenient and can lead to errors in the future, since it requires 
adding special checks in production code (IGNITE-26067) for the scenarios that 
are not possible in production. 


> Revise existing storage tests (StorageCleanupTest, IndexGcTest)
> ---------------------------------------------------------------
>
>                 Key: IGNITE-26411
>                 URL: https://issues.apache.org/jira/browse/IGNITE-26411
>             Project: Ignite
>          Issue Type: Improvement
>          Components: transactions ai3
>            Reporter: Pavel Pereslegin
>            Assignee: Egor Kuts
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Looks like some tests are not using the following StorageUpdateHandler 
> methods correctly:
>  * handleUpdate(...)
>  * handleUpdateAll(...)
> This means that the following parameter set invariant is violated:
> {code:java}
> assert trackWriteIntent || commitTs != null
> {code}
> When writing data to storage, two main situations are possible.
>  # The transaction is complete - the transaction is committed (in this case, 
> commitTs != null)
>  # The transaction is not complete - changes are accumulated (in this case, 
> trackWriteIntent=true)
> However, the following tests pass commitTs=null along with 
> trackWriteIntent=false
>  * StorageCleanupTest.testCleanupBeforeUpdateNoData
>  * StorageCleanupTest.testCleanupAndUpdateRowBatch
>  * StorageCleanupTest.testCleanupAndUpdateRow
>  * IndexGcTest.testRemoveTombstonesRowRowNull
>  * IndexGcTest.testRemoveStaleEntriesWithDifferentIndexes
>  * IndexGcTest.testRemoveTombstonesRowNullRow
>  * IndexGcTest.testRemoveTombstonesRowNullNull
>  * IndexGcTest.testRemoveStaleEntryWithSameIndex
> This is inconvenient and can lead to errors in the future, since it requires 
> adding special checks in production code (IGNITE-26067) for the scenarios 
> that are not possible in production.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to