Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b954b846
Unverified
提交
b954b846
authored
7 年前
作者:
Noel Grandin
提交者:
GitHub
7 年前
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1209 from katzyn/mvstore
Remove useless MVCC / no MVCC conditions from MVStore code
上级
acf1f91e
919d3e3b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
18 行删除
+4
-18
MVTable.java
h2/src/main/org/h2/mvstore/db/MVTable.java
+4
-18
没有找到文件。
h2/src/main/org/h2/mvstore/db/MVTable.java
浏览文件 @
b954b846
...
@@ -167,7 +167,7 @@ public class MVTable extends TableBase {
...
@@ -167,7 +167,7 @@ public class MVTable extends TableBase {
if
(
lockMode
==
Constants
.
LOCK_MODE_OFF
)
{
if
(
lockMode
==
Constants
.
LOCK_MODE_OFF
)
{
return
false
;
return
false
;
}
}
if
(!
forceLockEvenInMvcc
&&
database
.
isMVStore
()
)
{
if
(!
forceLockEvenInMvcc
)
{
// MVCC: update, delete, and insert use a shared lock.
// MVCC: update, delete, and insert use a shared lock.
// Select doesn't lock except when using FOR UPDATE and
// Select doesn't lock except when using FOR UPDATE and
// the system property h2.selectForUpdateMvcc
// the system property h2.selectForUpdateMvcc
...
@@ -280,8 +280,8 @@ public class MVTable extends TableBase {
...
@@ -280,8 +280,8 @@ public class MVTable extends TableBase {
}
}
private
boolean
doLock2
(
Session
session
,
int
lockMode
,
boolean
exclusive
)
{
private
boolean
doLock2
(
Session
session
,
int
lockMode
,
boolean
exclusive
)
{
if
(
exclusive
)
{
if
(
lockExclusiveSession
==
null
)
{
if
(
lockExclusiveSession
==
null
)
{
if
(
exclusive
)
{
if
(
lockSharedSessions
.
isEmpty
())
{
if
(
lockSharedSessions
.
isEmpty
())
{
traceLock
(
session
,
exclusive
,
TraceLockEvent
.
TRACE_LOCK_ADDED_FOR
,
NO_EXTRA_INFO
);
traceLock
(
session
,
exclusive
,
TraceLockEvent
.
TRACE_LOCK_ADDED_FOR
,
NO_EXTRA_INFO
);
session
.
addLock
(
this
);
session
.
addLock
(
this
);
...
@@ -305,21 +305,7 @@ public class MVTable extends TableBase {
...
@@ -305,21 +305,7 @@ public class MVTable extends TableBase {
}
}
return
true
;
return
true
;
}
}
}
}
else
{
}
else
{
if
(
lockExclusiveSession
==
null
)
{
if
(
lockMode
==
Constants
.
LOCK_MODE_READ_COMMITTED
)
{
if
(!
database
.
isMultiThreaded
()
&&
!
database
.
isMVStore
())
{
// READ_COMMITTED: a read lock is acquired,
// but released immediately after the operation
// is complete.
// When allowing only one thread, no lock is
// required.
// Row level locks work like read committed.
return
true
;
}
}
if
(
lockSharedSessions
.
putIfAbsent
(
session
,
session
)
==
null
)
{
if
(
lockSharedSessions
.
putIfAbsent
(
session
,
session
)
==
null
)
{
traceLock
(
session
,
exclusive
,
TraceLockEvent
.
TRACE_LOCK_OK
,
NO_EXTRA_INFO
);
traceLock
(
session
,
exclusive
,
TraceLockEvent
.
TRACE_LOCK_OK
,
NO_EXTRA_INFO
);
session
.
addLock
(
this
);
session
.
addLock
(
this
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论