Should transaction isolation level be an explicit choice?
At the moment the default transaction isolation level is implicitly set to Read Committed for Core. This is also documented: https://docs.particular.net/transports/transactions#controlling-transaction-scope-options-isolation-level
However, that conflicts with the default for TransactionScope which is Serializable. Customers running with defaults might thus assume Serializable.
Recently SQLP: Unexpected Serializable isolation level when using the outbox with UseTransactionScope while ReadCommitted is the default everywhere else was discovered. The cause was that during https://github.com/Particular/NServiceBus.Persistence.Sql/pull/586 likely this same assumption was made that the default would be Serializable.
Some options:
- Always make transaction isolation level an explicit choice
- Align the default transaction isolation level with .net defaults
- Have downstreams inherit the transaction isolation level that core has selected (default or explicit)
In v8, the new seam leaves the decision about the default to the transport: https://docs.particular.net/transports/transactions?version=core_8
@tmasternak I think you wanted to link to https://docs.particular.net/transports/transactions?version=core_8#controlling-transaction-scope-options ?
Then replace core with transport and the same problem remains.