Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
04a7dc4e
提交
04a7dc4e
authored
6 年前
作者:
Andrei Tokar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
another round of addressing code review comments
上级
a2519151
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
3 行增加
和
5 行删除
+3
-5
MVTable.java
h2/src/main/org/h2/mvstore/db/MVTable.java
+0
-1
TransactionStore.java
h2/src/main/org/h2/mvstore/tx/TransactionStore.java
+1
-1
TxDecisionMaker.java
h2/src/main/org/h2/mvstore/tx/TxDecisionMaker.java
+2
-3
没有找到文件。
h2/src/main/org/h2/mvstore/db/MVTable.java
浏览文件 @
04a7dc4e
...
@@ -10,7 +10,6 @@ import java.util.ArrayList;
...
@@ -10,7 +10,6 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/tx/TransactionStore.java
浏览文件 @
04a7dc4e
...
@@ -242,7 +242,7 @@ public class TransactionStore {
...
@@ -242,7 +242,7 @@ public class TransactionStore {
* @param operationId the operation id
* @param operationId the operation id
* @return the transaction id
* @return the transaction id
*/
*/
public
static
int
getTransactionId
(
long
operationId
)
{
static
int
getTransactionId
(
long
operationId
)
{
return
(
int
)
(
operationId
>>>
LOG_ID_BITS
);
return
(
int
)
(
operationId
>>>
LOG_ID_BITS
);
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/tx/TxDecisionMaker.java
浏览文件 @
04a7dc4e
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
package
org
.
h2
.
mvstore
.
tx
;
package
org
.
h2
.
mvstore
.
tx
;
import
org.h2.mvstore.MVMap
;
import
org.h2.mvstore.MVMap
;
import
static
org
.
h2
.
mvstore
.
tx
.
TransactionStore
.
getTransactionId
;
/**
/**
* Class TxDecisionMaker.
* Class TxDecisionMaker.
...
@@ -39,7 +38,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
...
@@ -39,7 +38,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
// or entry is a committed one
// or entry is a committed one
(
id
=
existingValue
.
getOperationId
())
==
0
||
(
id
=
existingValue
.
getOperationId
())
==
0
||
// or it came from the same transaction
// or it came from the same transaction
isThisTransaction
(
blockingId
=
getTransactionId
(
id
)))
{
isThisTransaction
(
blockingId
=
TransactionStore
.
getTransactionId
(
id
)))
{
logIt
(
existingValue
);
logIt
(
existingValue
);
decision
=
MVMap
.
Decision
.
PUT
;
decision
=
MVMap
.
Decision
.
PUT
;
}
else
if
(
isCommitted
(
blockingId
))
{
}
else
if
(
isCommitted
(
blockingId
))
{
...
@@ -137,7 +136,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
...
@@ -137,7 +136,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
long
id
=
existingValue
.
getOperationId
();
long
id
=
existingValue
.
getOperationId
();
if
(
id
==
0
// entry is a committed one
if
(
id
==
0
// entry is a committed one
// or it came from the same transaction
// or it came from the same transaction
||
isThisTransaction
(
blockingId
=
getTransactionId
(
id
)))
{
||
isThisTransaction
(
blockingId
=
TransactionStore
.
getTransactionId
(
id
)))
{
if
(
existingValue
.
value
!=
null
)
{
if
(
existingValue
.
value
!=
null
)
{
return
setDecision
(
MVMap
.
Decision
.
ABORT
);
return
setDecision
(
MVMap
.
Decision
.
ABORT
);
}
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论