Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
fec9cb49
Unverified
提交
fec9cb49
authored
6 年前
作者:
Andrei Tokar
提交者:
GitHub
6 年前
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1543 from h2database/mvstore-misc
MVStore assorted re-factorings
上级
5c4719de
e5d7f859
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
150 行增加
和
222 行删除
+150
-222
MVMap.java
h2/src/main/org/h2/mvstore/MVMap.java
+5
-5
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+81
-74
Page.java
h2/src/main/org/h2/mvstore/Page.java
+62
-138
MVRTreeMap.java
h2/src/main/org/h2/mvstore/rtree/MVRTreeMap.java
+1
-1
Transaction.java
h2/src/main/org/h2/mvstore/tx/Transaction.java
+1
-4
没有找到文件。
h2/src/main/org/h2/mvstore/MVMap.java
浏览文件 @
fec9cb49
...
...
@@ -993,7 +993,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
* @param memory the number of bytes used for this page
*/
protected
final
void
removePage
(
long
pos
,
int
memory
)
{
store
.
removePage
(
this
,
pos
,
memory
);
store
.
removePage
(
pos
,
memory
);
}
/**
...
...
@@ -1190,10 +1190,10 @@ public class MVMap<K, V> extends AbstractMap<K, V>
int
attempt
=
0
;
int
keyCount
;
while
((
keyCount
=
rootReference
.
getAppendCounter
())
>
0
)
{
Page
page
=
Page
.
create
(
this
,
Page
page
=
Page
.
create
Leaf
(
this
,
Arrays
.
copyOf
(
keysBuffer
,
keyCount
),
Arrays
.
copyOf
(
valuesBuffer
,
keyCount
),
null
,
keyCount
,
0
);
0
);
CursorPos
pos
=
rootReference
.
root
.
getAppendCursorPos
(
null
);
assert
page
.
map
==
this
;
assert
pos
!=
null
;
...
...
@@ -1215,7 +1215,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
Page
.
PageReference
children
[]
=
new
Page
.
PageReference
[]
{
new
Page
.
PageReference
(
p
),
new
Page
.
PageReference
(
page
)};
p
=
Page
.
create
(
this
,
keys
,
null
,
children
,
p
.
getTotalCount
()
+
page
.
getTotalCount
(),
0
);
p
=
Page
.
create
Node
(
this
,
keys
,
children
,
p
.
getTotalCount
()
+
page
.
getTotalCount
(),
0
);
}
break
;
}
...
...
@@ -1784,7 +1784,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
new
Page
.
PageReference
(
p
),
new
Page
.
PageReference
(
split
)
};
p
=
Page
.
create
(
this
,
keys
,
null
,
children
,
totalCount
,
0
);
p
=
Page
.
create
Node
(
this
,
keys
,
children
,
totalCount
,
0
);
break
;
}
Page
c
=
p
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
fec9cb49
差异被折叠。
点击展开。
h2/src/main/org/h2/mvstore/Page.java
浏览文件 @
fec9cb49
差异被折叠。
点击展开。
h2/src/main/org/h2/mvstore/rtree/MVRTreeMap.java
浏览文件 @
fec9cb49
...
...
@@ -154,7 +154,7 @@ public final class MVRTreeMap<V> extends MVMap<SpatialKey, V> {
new
Page
.
PageReference
(
split
),
Page
.
PageReference
.
EMPTY
};
p
=
Page
.
create
(
this
,
keys
,
null
,
children
,
totalCount
,
0
);
p
=
Page
.
create
Node
(
this
,
keys
,
children
,
totalCount
,
0
);
if
(
store
.
getFileStore
()
!=
null
)
{
store
.
registerUnsavedPage
(
p
.
getMemory
());
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/tx/Transaction.java
浏览文件 @
fec9cb49
...
...
@@ -182,10 +182,6 @@ public class Transaction {
int
currentStatus
=
getStatus
(
currentState
);
boolean
valid
;
switch
(
status
)
{
case
STATUS_OPEN:
valid
=
currentStatus
==
STATUS_CLOSED
||
currentStatus
==
STATUS_ROLLING_BACK
;
break
;
case
STATUS_ROLLING_BACK:
valid
=
currentStatus
==
STATUS_OPEN
;
break
;
...
...
@@ -207,6 +203,7 @@ public class Transaction {
valid
=
currentStatus
==
STATUS_COMMITTED
||
currentStatus
==
STATUS_ROLLED_BACK
;
break
;
case
STATUS_OPEN:
default
:
valid
=
false
;
break
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论