Description
Describe the bug
When making use of the deferred execution (as demo'd in https://github.com/danielgerlag/workflow-core/tree/master/src/samples/WorkflowCore.Sample05),
e.g.
return ExecutionResult.Sleep(pollingDelay, new object());
I notice the following error (log):
A write operation resulted in an error. WriteError: { Category : "DuplicateKey", Code : 11000, Message : "E11000 duplicate key error collection: foobar.wfc.scheduled_commands index: idx_key dup key: { CommandName: "ProcessWorkflow", Data: "619cefda1e173f3b8cc532be" }" }.
To Reproduce
Run multiple hosts (6 at the moment) using MongoDB persistence; RedisLocking, RediseQueues and RedisEventHub. Defer the execution for an activity (as instructed at https://github.com/danielgerlag/workflow-core/tree/master/src/samples/WorkflowCore.Sample05).
When the activity is deferred, an error is logged out every 10 seconds.
Expected behavior
Activity should be delayed/deferred, execute and no errors be highlighted in logs
Additional context
running WorkflowCore 3.6.1