Ignore invalid Isolation Level for SQL CE


Commit https://orchard.codeplex.com/SourceControl/changeset/e9fd66a5af7a23cb76b5ea09b776a60018c6b15a has broken SQL Ce in 1.x. All database access fails with
NHibernate.Transaction.AdoTransaction - (null) - Begin transaction failed
System.ArgumentException: The IsolationLevel value ReadUncommitted is invalid.

The reason is that the changed Sites.config enables IsolationLevel ReadUncommitted which is not supported in SQL Ce.

I think that ReadUncommited should be used by default for SQL Server and that the new Sites.config with ReadUncommitted should therefore remain the default setting.

I've attached a patched version of SessionLocater.cs which simply ignores custom IsolationLevel for SQL Ce.

file attachments


sebastienros wrote Apr 21, 2014 at 5:43 PM

Correct, bad commit

sebastienros wrote Apr 22, 2014 at 12:02 AM

Fixed in changeset d221962870dbfdbc24fd34928059366ee7a4fa79

IntranetFactory wrote Apr 22, 2014 at 12:16 AM

I think that IsolationLevel should be ReadUncommitted on SQL server. That's the reason I've created a patch.

With the patch you can now set IsolationLevel ReadUncommitted in your Sites.config without breaking Sql CE.

Any reason why the patch was not used?

sebastienros wrote Apr 22, 2014 at 12:59 AM

Actually I had not looked at the patch. But now I have and I still think we should not apply it. Going to ReadUncommitted should be a decision, not a default. Even if SqlCe is the only one "right now" not to support it.