Can Commit Timeout cause an WrongExpectedVersion exception even though the event was committed correctly?

Hi,
We are seeing the following scenario:

  1. An event is written to Event Store
  2. Write fails with a WrongExpectedVersion exception
  3. Despite the WrongExpectedVersion exception, the event is correctly stored in event store
    In the logs we are seeing several “Failed to write events to stream” with “Error: CommitTimeout”.

It seems that Event Store is doing a retry on the commit timeout and this retry is causing the WrongExpectedVersion(because the initial commit actually did succeed), but shouldn’t the retry just be identified as an idempotent write and not cause the WrongExpectedVersion.

Any comments appreciated.

/Casper