Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using replicate with --show-diffs option #112

Closed
samongyr-sq opened this issue Jun 15, 2023 · 2 comments
Closed

Error when using replicate with --show-diffs option #112

samongyr-sq opened this issue Jun 15, 2023 · 2 comments
Labels
released Issue has been released

Comments

@samongyr-sq
Copy link

The tool (v3.0.3) outputs an error when using the replicate command with the --show-diffs option taken from this section of the documentation

$ riot <source> replicate <target> --show-diffs

Scanning 100% │██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████│ 113580/113580 (0:00:07 / 0:00:00) 16225.7/s
Verifying  93% │████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉        │ 105400/112899 (0:00:09 / 0:00:00) 11711.1/s >0 T0 ≠1 ⧗0
Encountered an error executing step verification in job snapshot-replication: class java.util.ArrayList cannot be cast to class java.util.Set (java.util.ArrayList and java.util.Set are in module java.base of loader 'bootstrap')

Version Info

$ riot --version

      ▀        █     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 █ ██ █  ███  ████   ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 ██   █ █   █  █     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 █    █ █   █  █     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 █    █  ███    ██   ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄  v3.0.3
$ java --version
openjdk 11.0.19 2023-04-18 LTS

Additional Logs

21:47:42.349 SEVERE org.springframework.batch.core.step.AbstractStep	: Encountered an error executing step verification in job snapshot-replication
org.springframework.batch.core.listener.StepListenerFailedException: Error in afterWrite.
	at org.springframework.batch.core.listener.MulticasterBatchListener.afterWrite(MulticasterBatchListener.java:271)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.doAfterWrite(SimpleChunkProcessor.java:175)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.doWrite(SimpleChunkProcessor.java:160)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.write(SimpleChunkProcessor.java:294)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:217)
	at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:77)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:407)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:331)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:273)
	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:82)
	at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375)
	at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
	at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145)
	at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:258)
	at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208)
	at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:152)
	at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:413)
	at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:136)
	at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:149)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140)
	at com.redis.spring.batch.common.JobRunner.run(JobRunner.java:229)
	at com.redis.riot.cli.common.AbstractCommand.call(AbstractCommand.java:62)
	at com.redis.riot.cli.common.AbstractCommand.call(AbstractCommand.java:26)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at com.redis.riot.cli.common.RiotExecutionStrategy.execute(RiotExecutionStrategy.java:42)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at com.redis.riot.cli.Main.execute(Main.java:56)
	at com.redis.riot.cli.Main.main(Main.java:44)
Caused by: java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.util.Set (java.util.ArrayList and java.util.Set are in module java.base of loader 'bootstrap')
	at com.redis.riot.core.KeyComparisonLogger.showSetDiff(KeyComparisonLogger.java:174)
	at com.redis.riot.core.KeyComparisonLogger.log(KeyComparisonLogger.java:56)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1085)
	at com.redis.riot.cli.common.KeyComparisonWriteListener.afterWrite(KeyComparisonWriteListener.java:30)
	at org.springframework.batch.core.listener.CompositeItemWriteListener.afterWrite(CompositeItemWriteListener.java:60)
	at org.springframework.batch.core.listener.MulticasterBatchListener.afterWrite(MulticasterBatchListener.java:268)
	... 36 more

21:47:42.350 INFO org.springframework.batch.core.step.AbstractStep	: Step: [verification] executed in 10s209ms
@jruaux
Copy link
Collaborator

jruaux commented Jun 15, 2023

Thanks for reporting this issue. Working on a fix.

@jruaux jruaux closed this as completed in 38fbb45 Jun 15, 2023
@jruaux jruaux added the released Issue has been released label Jun 16, 2023
@jruaux
Copy link
Collaborator

jruaux commented Jun 16, 2023

🎉 This issue has been resolved in v3.0.4 (Release Notes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Issue has been released
Projects
None yet
Development

No branches or pull requests

2 participants