When queuing two tasks with the same version, documentId and type at the same timestamp (millisecond), one of the tasks can fail to be canceled, leading to an exception
java.util.concurrent.CancellationException
at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2478)
at org.xwiki.index.internal.DefaultTasksManager.consume(DefaultTasksManager.java:229)
at org.xwiki.index.internal.DefaultTasksManager.run(DefaultTasksManager.java:209)
at java.base/java.lang.Thread.run(Thread.java:840)