[
https://issues.apache.org/jira/browse/IGNITE-17968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Semyon Danilov reassigned IGNITE-17968:
---------------------------------------
Assignee: Semyon Danilov
> Seems that mvDataStorage.scan doesn't return pending removed value as
> writeIntent
> ---------------------------------------------------------------------------------
>
> Key: IGNITE-17968
> URL: https://issues.apache.org/jira/browse/IGNITE-17968
> Project: Ignite
> Issue Type: Bug
> Reporter: Alexander Lapin
> Assignee: Semyon Danilov
> Priority: Major
> Labels: transaction3_ro
> Fix For: 3.0.0-beta1
>
>
> Following test will work
> {code:java}
> @Test
> public void testReadOnlyGetWriteIntentResolutionUpdate() {
> accounts.recordView().upsert(null, makeValue(1, 100.));
> // Pending tx
> Transaction tx = igniteTransactions.begin();
> accounts.recordView().upsert(tx, makeValue(1, 300.));
> // Update
> Transaction readOnlyTx = igniteTransactions.readOnly().begin();
> assertEquals(100., accounts.recordView().get(readOnlyTx,
> makeKey(1)).doubleValue("balance"));
> }{code}
> And following won't
> {code:java}
> @Test
> public void testReadOnlyGetWriteIntentResolutionRemoveTmp() {
> accounts.recordView().upsert(null, makeValue(1, 100.));
> // Pending tx
> Transaction tx = igniteTransactions.begin();
> accounts.recordView().delete(tx, makeKey(1));
> // Remove.
> Transaction readOnlyTx = igniteTransactions.readOnly().begin();
> assertEquals(100., accounts.recordView().get(readOnlyTx,
> makeKey(1)).doubleValue("balance"));
> } {code}
> Internally mvDataStorage.scan(readTimestamp) in
> PartitionReplicaListener#processReadOnlyMultiEntryAction will skip such
> pending removed entries.
> Please pay attention that writeIntetns that contain data (update pending
> modification instead of remove one) works propertly. See
> ItTxDistributedTestSingleNode#testReadOnlyGetWriteIntentResolutionUpdate and
> ItTxDistributedTestSingleNode#testReadOnlyPendingWriteIntentSkippedTmp for
> more details.
> *Reproducers:*
> ItTxDistributedTestSingleNode#testReadOnlyGetWriteIntentResolutionRemoveTmp
> ItTxDistributedTestSingleNode#testReadOnlyPendingWriteIntentSkippedCombinedTmp
--
This message was sent by Atlassian Jira
(v8.20.10#820010)