惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
C
Cisco Blogs
A
Arctic Wolf
月光博客
月光博客
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
量子位
小众软件
小众软件
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
N
Netflix TechBlog - Medium
K
Kaspersky official blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Y
Y Combinator Blog
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
S
Schneier on Security
D
Docker
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
GbyAI
GbyAI
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
H
Help Net Security
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
B
Blog
Know Your Adversary
Know Your Adversary
IT之家
IT之家

博客园 - 杨义金

Csla One or more properties are not registered for this type unomp 矿池运行问题随记 矿池负载运行监测记录 MySql 数据库移植记录 后台服务运行后无故停止运行,原因不明 缓存过期时间的设置 Bitcoin 使用及配置记录 关于 CSLA 服务器部署WCF访问出错的问题 AR 不同 继承映射的问题总结 当事人角色 变更映射策略引起的问题 Castle ActiveRecord 二级缓存使用 异常记录 VS2013 抛出 stackoverflow exception 的追踪 WF4.0 工作流设计器 传入参数问题记录? Solving GitHub FetchHead (MergeConflict) in Visual Studio 2013 昆明光标科技有限公司简介 Castle.ActiveRecord 多对多关系 引发的错误处理 String PK StringBuilder,传说就是传说,只有动手实验,才能得出确定的答案 .net mvc Bundle 问题解决方案 .net 4.0 自定义本地缓存策略的不同实现
CastleActiveRecord在多线程 事务提交时数据库资源竞争导致更新失败的测试结果记录
杨义金 · 2015-12-05 · via 博客园 - 杨义金

CastleActiveRecord 经过测试,隔离级别:

      // 摘要: 

    //     指定连接的事务锁定行为。
    public enum IsolationLevel
    {
        // 摘要: 
        
//     正在使用与指定隔离级别不同的隔离级别,但是无法确定该级别。
        Unspecified = -1,
        //
        
// 摘要: 
        
//     无法覆盖隔离级别更高的事务中的挂起的更改。
        Chaos = 16,
        //
        
// 摘要: 
        
//     可以进行脏读,意思是说,不发布共享锁,也不接受独占锁。
        ReadUncommitted = 256,
        //
        
// 摘要: 
        
//     在正在读取数据时保持共享锁,以避免脏读,但是在事务结束之前可以更改数据,从而导致不可重复的读取或幻像数据。
        ReadCommitted = 4096,
        //
        
// 摘要: 
        
//     在查询中使用的所有数据上放置锁,以防止其他用户更新这些数据。防止不可重复的读取,但是仍可以有幻像行。
        RepeatableRead = 65536,
        //
        
// 摘要: 
        
//     在 System.Data.DataSet 上放置范围锁,以防止在事务完成之前由其他用户更新行或向数据集中插入行。
        Serializable = 1048576,
        //
        
// 摘要: 
        
//     通过在一个应用程序正在修改数据时存储另一个应用程序可以读取的相同数据版本来减少阻止。表示您无法从一个事务中看到在其他事务中进行的更改,即便重新查询也是如此。
        Snapshot = 16777216,
    }

Chaos是不支持的,Snapshot 必须修改数据库支持。

在多线程提交时,在提交时务时,主动将线程 挂起 300ms后再继续提交,配合 ReadCommitted模式  

可以完成提交,但心中总是没有底。

 其它模式 无论如何都无法得到正确的结果,ReadUncommitted 模式得到的结果是 错误的数据,因为事务过程得到的是脏数据。