tkalkirill commented on code in PR #1305:
URL: https://github.com/apache/ignite-3/pull/1305#discussion_r1012755404
##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/AbstractMvTableStorageTest.java:
##########
@@ -311,51 +313,89 @@ public void testMisconfiguredIndices() {
@Test
public void testStartRebalanceMvPartition() throws Exception {
+ assertThrows(StorageException.class, () ->
tableStorage.startRebalanceMvPartition(PARTITION_ID_1));
+
+ UUID hashIndexId = hashIdx.id();
+ UUID sortedIndexId = sortedIdx.id();
+
MvPartitionStorage partitionStorage =
tableStorage.getOrCreateMvPartition(PARTITION_ID);
+ HashIndexStorage hashIndexStorage =
tableStorage.getOrCreateHashIndex(PARTITION_ID, hashIndexId);
+ SortedIndexStorage sortedIndexStorage =
tableStorage.getOrCreateSortedIndex(PARTITION_ID, sortedIndexId);
+
+ RowId rowId = new RowId(PARTITION_ID);
+
+ TestKey key = new TestKey(0, "0");
+
+ BinaryRow binaryRow = binaryRow(key, new TestValue(1, "1"));
+ IndexRowImpl indexRow = new
IndexRowImpl(keyValueBinaryTuple(binaryRow), rowId);
partitionStorage.runConsistently(() -> {
- partitionStorage.addWriteCommitted(
- new RowId(PARTITION_ID),
- binaryRow(new TestKey(0, "0"), new TestValue(1, "1")),
- clock.now()
- );
+ partitionStorage.addWriteCommitted(rowId, binaryRow, clock.now());
partitionStorage.lastAppliedIndex(100);
return null;
});
+ hashIndexStorage.put(indexRow);
Review Comment:
Technically it can do this, but you're right, let it be inside
`runConsistently`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]