Skip to content

Commit 33315e7

Browse files
authored
IGNITE-24084 Remove VerifyBackupPartitionsTaskV2#V2_SINCE_VER (#11788)
* IGNITE-24084 Remove VerifyBackupPartitionsTaskV2#V2_SINCE_VER * IGNITE-24084 Remove VerifyBackupPartitionsTaskV2#V2_SINCE_VER * IGNITE-24084 Remove V2 related code * IGNITE-24084 Resolve conflicts
1 parent a5d2b4e commit 33315e7

File tree

29 files changed

+121
-125
lines changed

29 files changed

+121
-125
lines changed

modules/compress/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotCompressionBasicTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
import org.apache.ignite.configuration.IgniteConfiguration;
5050
import org.apache.ignite.internal.GridKernalContextImpl;
5151
import org.apache.ignite.internal.IgniteEx;
52-
import org.apache.ignite.internal.management.cache.IdleVerifyResultV2;
52+
import org.apache.ignite.internal.management.cache.IdleVerifyResult;
5353
import org.apache.ignite.internal.processors.cache.persistence.file.FileIO;
5454
import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIO;
5555
import org.apache.ignite.internal.processors.compress.CompressionProcessor;
@@ -336,7 +336,7 @@ protected void createTestSnapshot() throws Exception {
336336
for (String snpName : Arrays.asList(SNAPSHOT_WITH_HOLES, SNAPSHOT_WITHOUT_HOLES)) {
337337
snp(ignite).createSnapshot(snpName, null, false, onlyPrimary).get(TIMEOUT);
338338

339-
IdleVerifyResultV2 res = ignite.context().cache().context().snapshotMgr().checkSnapshot(snpName, null)
339+
IdleVerifyResult res = ignite.context().cache().context().snapshotMgr().checkSnapshot(snpName, null)
340340
.get().idleVerifyResult();
341341

342342
StringBuilder b = new StringBuilder();

modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerCheckIncrementalSnapshotTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.apache.ignite.internal.GridKernalContext;
3030
import org.apache.ignite.internal.IgniteEx;
3131
import org.apache.ignite.internal.TestRecordingCommunicationSpi;
32-
import org.apache.ignite.internal.management.cache.IdleVerifyResultV2;
32+
import org.apache.ignite.internal.management.cache.IdleVerifyResult;
3333
import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
3434
import org.apache.ignite.internal.pagemem.wal.record.DataRecord;
3535
import org.apache.ignite.internal.pagemem.wal.record.TxRecord;
@@ -378,7 +378,7 @@ public void atomicCachesAreSkippedDuringTheCheck() throws Exception {
378378

379379
grid(0).snapshot().restoreSnapshot(atomicSnp, null, 1).get();
380380

381-
IdleVerifyResultV2 idleVerRes = idleVerify(grid(0), CACHE, atomicCache);
381+
IdleVerifyResult idleVerRes = idleVerify(grid(0), CACHE, atomicCache);
382382

383383
idleVerRes.print(System.out::println, true);
384384

modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerInterruptCommandTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.apache.ignite.events.EventType;
3737
import org.apache.ignite.internal.IgniteEx;
3838
import org.apache.ignite.internal.IgniteInternalFuture;
39-
import org.apache.ignite.internal.management.cache.IdleVerifyTaskV2;
39+
import org.apache.ignite.internal.management.cache.IdleVerifyTask;
4040
import org.apache.ignite.internal.management.cache.ValidateIndexesClosure;
4141
import org.apache.ignite.internal.management.cache.ValidateIndexesTask;
4242
import org.apache.ignite.internal.util.typedef.internal.S;
@@ -57,7 +57,7 @@ public class GridCommandHandlerInterruptCommandTest extends GridCommandHandlerAb
5757
private static final int LOAD_LOOP = 500_000;
5858

5959
/** Idle verify task name. */
60-
private static final String IDLE_VERIFY_TASK_V2 = IdleVerifyTaskV2.class.getName();
60+
private static final String IDLE_VERIFY_TASK = IdleVerifyTask.class.getName();
6161

6262
/** Validate index task name. */
6363
private static final String VALIDATE_INDEX_TASK = ValidateIndexesTask.class.getName();
@@ -234,7 +234,7 @@ public void testIdleVerifyCommand() throws Exception {
234234

235235
preloadeData(ignite);
236236

237-
CountDownLatch startTaskLatch = waitForTaskEvent(ignite, IDLE_VERIFY_TASK_V2);
237+
CountDownLatch startTaskLatch = waitForTaskEvent(ignite, IDLE_VERIFY_TASK);
238238

239239
LogListener lnsrValidationCancelled = LogListener.matches("The check procedure was cancelled.").build();
240240
LogListener lnsrIdleVerifyStart = LogListener.matches("Idle verify procedure has started").build();

modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
import org.apache.ignite.internal.client.util.GridConcurrentHashSet;
8989
import org.apache.ignite.internal.management.cache.FindAndDeleteGarbageInPersistenceTaskResult;
9090
import org.apache.ignite.internal.management.cache.IdleVerifyDumpTask;
91-
import org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTaskV2;
91+
import org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTask;
9292
import org.apache.ignite.internal.management.tx.TxInfo;
9393
import org.apache.ignite.internal.management.tx.TxTaskResult;
9494
import org.apache.ignite.internal.managers.communication.GridIoMessage;
@@ -172,8 +172,8 @@
172172
import static org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_UNEXPECTED_ERROR;
173173
import static org.apache.ignite.internal.encryption.AbstractEncryptionTest.MASTER_KEY_NAME_2;
174174
import static org.apache.ignite.internal.management.cache.CacheIdleVerifyCancelTask.TASKS_TO_CANCEL;
175-
import static org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTaskV2.CACL_PART_HASH_ERR_MSG;
176-
import static org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTaskV2.CP_REASON;
175+
import static org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTask.CACL_PART_HASH_ERR_MSG;
176+
import static org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTask.CP_REASON;
177177
import static org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.IGNITE_PDS_SKIP_CHECKPOINT_ON_NODE_STOP;
178178
import static org.apache.ignite.internal.processors.cache.persistence.snapshot.AbstractSnapshotSelfTest.doSnapshotCancellationTest;
179179
import static org.apache.ignite.internal.processors.cache.persistence.snapshot.AbstractSnapshotSelfTest.snp;
@@ -772,7 +772,7 @@ public void testIdleVerifyOnInactiveClusterWithPersistence() throws Exception {
772772

773773
assertEquals(EXIT_CODE_UNEXPECTED_ERROR, execute("--cache", "idle_verify"));
774774

775-
assertContains(log, testOut.toString(), VerifyBackupPartitionsTaskV2.IDLE_VERIFY_ON_INACTIVE_CLUSTER_ERROR_MESSAGE);
775+
assertContains(log, testOut.toString(), VerifyBackupPartitionsTask.IDLE_VERIFY_ON_INACTIVE_CLUSTER_ERROR_MESSAGE);
776776
assertContains(log, testOut.toString(), "Failed to perform operation");
777777

778778
srv.cluster().state(ACTIVE);
@@ -843,7 +843,7 @@ public void testIdleVerifyCancelBeforeCalcPartitionHashStarted() throws Exceptio
843843
}
844844
};
845845

846-
VerifyBackupPartitionsTaskV2.poolSupplier = () -> pool;
846+
VerifyBackupPartitionsTask.poolSupplier = () -> pool;
847847
}, false);
848848
}
849849

@@ -895,7 +895,7 @@ public void testIdleVerifyCancelWhileCalcPartitionHashRunning() throws Exception
895895
}
896896
};
897897

898-
VerifyBackupPartitionsTaskV2.poolSupplier = () -> pool;
898+
VerifyBackupPartitionsTask.poolSupplier = () -> pool;
899899
}, checkCrc);
900900

901901
assertTrue("All tasks must be cancelled", interruptedOnCancel.get());

modules/core/src/main/java/org/apache/ignite/internal/management/cache/CacheFilterEnum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* Represents a type of cache(s) that can be used for comparing update counters and checksums between primary and backup partitions.
2424
* <br>
25-
* @see VerifyBackupPartitionsTaskV2
25+
* @see VerifyBackupPartitionsTask
2626
*/
2727
public enum CacheFilterEnum {
2828
/** Default - user only, or all caches specified by name. */

modules/core/src/main/java/org/apache/ignite/internal/management/cache/CacheIdleVerifyCancelTask.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636
/**
3737
* Task that cancels jobs started by idle_verify command.
3838
*
39-
* @see IdleVerifyTaskV2
40-
* @see VerifyBackupPartitionsTaskV2
39+
* @see IdleVerifyTask
40+
* @see VerifyBackupPartitionsTask
4141
*/
4242
public class CacheIdleVerifyCancelTask extends VisorMultiNodeTask<NoArg, Void, Void> {
4343
/** */
4444
private static final long serialVersionUID = 0L;
4545

4646
/** Jobs started by tasks must be canceled. */
4747
public static final Set<String> TASKS_TO_CANCEL = Set.of(
48-
IdleVerifyTaskV2.class.getName(),
49-
VerifyBackupPartitionsTaskV2.class.getName()
48+
IdleVerifyTask.class.getName(),
49+
VerifyBackupPartitionsTask.class.getName()
5050
);
5151

5252
/** {@inheritDoc} */
@@ -62,8 +62,8 @@ public class CacheIdleVerifyCancelTask extends VisorMultiNodeTask<NoArg, Void, V
6262
/**
6363
* Job that cancels jobs started by idle_verify command.
6464
*
65-
* @see IdleVerifyTaskV2
66-
* @see VerifyBackupPartitionsTaskV2
65+
* @see IdleVerifyTask
66+
* @see VerifyBackupPartitionsTask
6767
*/
6868
private class CacheIdleVerifyCancelJob extends VisorJob<NoArg, Void> {
6969
/** */

modules/core/src/main/java/org/apache/ignite/internal/management/cache/CacheIdleVerifyCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
/** Checks consistency of primary and backup partitions assuming no concurrent updates are happening in the cluster. */
3737
@CliSubcommandsWithPrefix
3838
public class CacheIdleVerifyCommand
39-
extends CommandRegistryImpl<CacheIdleVerifyCommandArg, IdleVerifyResultV2>
40-
implements ComputeCommand<CacheIdleVerifyCommandArg, IdleVerifyResultV2> {
39+
extends CommandRegistryImpl<CacheIdleVerifyCommandArg, IdleVerifyResult>
40+
implements ComputeCommand<CacheIdleVerifyCommandArg, IdleVerifyResult> {
4141
/** */
4242
public static final String IDLE_VERIFY_FILE_PREFIX = "idle_verify-";
4343

@@ -70,12 +70,12 @@ public CacheIdleVerifyCommand() {
7070
}
7171

7272
/** {@inheritDoc} */
73-
@Override public Class<IdleVerifyTaskV2> taskClass() {
74-
return IdleVerifyTaskV2.class;
73+
@Override public Class<IdleVerifyTask> taskClass() {
74+
return IdleVerifyTask.class;
7575
}
7676

7777
/** {@inheritDoc} */
78-
@Override public void printResult(CacheIdleVerifyCommandArg arg, IdleVerifyResultV2 res, Consumer<String> printer) {
78+
@Override public void printResult(CacheIdleVerifyCommandArg arg, IdleVerifyResult res, Consumer<String> printer) {
7979
logParsedArgs(arg, printer);
8080

8181
StringBuilder sb = new StringBuilder();

modules/core/src/main/java/org/apache/ignite/internal/management/cache/IdleVerifyException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.apache.ignite.internal.util.typedef.F;
2424

2525
/**
26-
* This exception is used to collect exceptions occured in {@link VerifyBackupPartitionsTaskV2} execution.
26+
* This exception is used to collect exceptions occured in {@link VerifyBackupPartitionsTask} execution.
2727
*/
2828
public class IdleVerifyException extends IgniteException {
2929
/** */

modules/core/src/main/java/org/apache/ignite/internal/management/cache/IdleVerifyResultV2.java renamed to modules/core/src/main/java/org/apache/ignite/internal/management/cache/IdleVerifyResult.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
import static org.apache.ignite.internal.util.IgniteUtils.nl;
4646

4747
/**
48-
* Encapsulates result of {@link VerifyBackupPartitionsTaskV2}.
48+
* Encapsulates result of {@link VerifyBackupPartitionsTask}.
4949
*/
50-
public class IdleVerifyResultV2 extends VisorDataTransferObject {
50+
public class IdleVerifyResult extends VisorDataTransferObject {
5151
/** */
5252
private static final long serialVersionUID = 0L;
5353

@@ -82,20 +82,20 @@ public class IdleVerifyResultV2 extends VisorDataTransferObject {
8282
/**
8383
* Default constructor for Externalizable.
8484
*/
85-
public IdleVerifyResultV2() {
85+
public IdleVerifyResult() {
8686
}
8787

8888
/**
8989
* @param exceptions Occurred exceptions.
9090
*/
91-
public IdleVerifyResultV2(Map<ClusterNode, Exception> exceptions) {
91+
public IdleVerifyResult(Map<ClusterNode, Exception> exceptions) {
9292
this.exceptions = exceptions;
9393
}
9494

9595
/**
9696
* @param txHashConflicts Transaction hashes conflicts.
9797
*/
98-
public IdleVerifyResultV2(
98+
public IdleVerifyResult(
9999
Map<PartitionKeyV2, List<PartitionHashRecordV2>> clusterHashes,
100100
@Nullable List<List<TransactionsHashRecord>> txHashConflicts,
101101
@Nullable Map<ClusterNode, Collection<GridCacheVersion>> partiallyCommittedTxs
@@ -110,7 +110,7 @@ public IdleVerifyResultV2(
110110
* @param clusterHashes Map of cluster partition hashes.
111111
* @param exceptions Exceptions on each cluster node.
112112
*/
113-
public IdleVerifyResultV2(
113+
public IdleVerifyResult(
114114
Map<PartitionKeyV2, List<PartitionHashRecordV2>> clusterHashes,
115115
Map<ClusterNode, Exception> exceptions
116116
) {
@@ -390,12 +390,12 @@ private void printConflicts(Consumer<String> printer) {
390390
if (o == null || getClass() != o.getClass())
391391
return false;
392392

393-
IdleVerifyResultV2 v2 = (IdleVerifyResultV2)o;
393+
IdleVerifyResult v = (IdleVerifyResult)o;
394394

395-
return Objects.equals(cntrConflicts, v2.cntrConflicts) && Objects.equals(hashConflicts, v2.hashConflicts) &&
396-
Objects.equals(movingPartitions, v2.movingPartitions) && Objects.equals(lostPartitions, v2.lostPartitions) &&
397-
Objects.equals(exceptions, v2.exceptions) && Objects.equals(txHashConflicts, v2.txHashConflicts) &&
398-
Objects.equals(partiallyCommittedTxs, v2.partiallyCommittedTxs);
395+
return Objects.equals(cntrConflicts, v.cntrConflicts) && Objects.equals(hashConflicts, v.hashConflicts) &&
396+
Objects.equals(movingPartitions, v.movingPartitions) && Objects.equals(lostPartitions, v.lostPartitions) &&
397+
Objects.equals(exceptions, v.exceptions) && Objects.equals(txHashConflicts, v.txHashConflicts) &&
398+
Objects.equals(partiallyCommittedTxs, v.partiallyCommittedTxs);
399399
}
400400

401401
/** {@inheritDoc} */
@@ -412,6 +412,6 @@ private void printConflicts(Consumer<String> printer) {
412412

413413
/** {@inheritDoc} */
414414
@Override public String toString() {
415-
return S.toString(IdleVerifyResultV2.class, this);
415+
return S.toString(IdleVerifyResult.class, this);
416416
}
417417
}

modules/core/src/main/java/org/apache/ignite/internal/management/cache/IdleVerifyTaskV2.java renamed to modules/core/src/main/java/org/apache/ignite/internal/management/cache/IdleVerifyTask.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
* Task to verify checksums of backup partitions.
2727
*/
2828
@GridInternal
29-
public class IdleVerifyTaskV2 extends VisorOneNodeTask<CacheIdleVerifyCommandArg, IdleVerifyResultV2> {
29+
public class IdleVerifyTask extends VisorOneNodeTask<CacheIdleVerifyCommandArg, IdleVerifyResult> {
3030
/** */
3131
private static final long serialVersionUID = 0L;
3232

3333
/** {@inheritDoc} */
34-
@Override protected VisorJob<CacheIdleVerifyCommandArg, IdleVerifyResultV2> job(CacheIdleVerifyCommandArg arg) {
34+
@Override protected VisorJob<CacheIdleVerifyCommandArg, IdleVerifyResult> job(CacheIdleVerifyCommandArg arg) {
3535
if (!ignite.context().state().publicApiActiveState(true))
36-
throw new IgniteException(VerifyBackupPartitionsTaskV2.IDLE_VERIFY_ON_INACTIVE_CLUSTER_ERROR_MESSAGE);
36+
throw new IgniteException(VerifyBackupPartitionsTask.IDLE_VERIFY_ON_INACTIVE_CLUSTER_ERROR_MESSAGE);
3737

38-
return new IdleVerifyJob<>(arg, debug, VerifyBackupPartitionsTaskV2.class);
38+
return new IdleVerifyJob<>(arg, debug, VerifyBackupPartitionsTask.class);
3939
}
4040
}

0 commit comments

Comments
 (0)