-
Notifications
You must be signed in to change notification settings - Fork 35
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
EnlistInAmbientTransaction should not change isolation level to SERIALIZABLE if there is no ambient transaction #12
Comments
Workaround for 5.2.0: Ensure there is an active |
@fschmied Could you provide a simple code example of how this should be done? For me as a novice to understand. |
@HAXEN Sorry, I missed your question. First, check if you really need
|
(PS: |
My usecase being: Let's say I have an AggregateRoot representing a country and the key being In order to not having duplicates into the eventstore I figure either Or Should I make the system being able to create duplicates and in that case Being sort of new to CQRS this is not clear to me. On Mon, May 30, 2016 at 4:47 PM, Fabian Schmied notifications@github.com
|
@HAXEN I guess this bug report is not the right way to discuss your specific question, better ask at https://groups.google.com/d/forum/dddcqrs for CQRS-speciifc questions or at https://groups.google.com/forum/#!forum/neventstore for NEventStore-related ones. That said, the |
If there's no ambiente transaction an 'EnlistInAmbientTransaction' has been called a new TransactionScope with the default ReadCommitted transaction isolation level will be generated |
When
EnlistInAmbientTransaction
is called in wire-up, the default isolation level of the SQL Persistence for SQL Server is changed from the database default ofREAD COMMITTED
toSERIALIZABLE
. This can and probably should be fixed directly in NEventStore (NEventStore/NEventStore#414), but if it isn't, a workaround should be added in NEventStore.Persistence.SQL because the SQL persistence doesn't work as nicely with theSERIALIZABLE
isolation level (we experienced database-level deadlocks with multiple readers/writers), and it's also much less efficient.Reason for the
SERIALIZABLE
isolation level: If theTransactionScopeOption.Required
is used (via code inPersistenceWireup
) without specifying an isolation level, theTransactionScope
default isolation level ofSERIALIZABLE
is used if there is no ambient transaction.The text was updated successfully, but these errors were encountered: