Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c5d33cf2
提交
c5d33cf2
authored
12月 10, 2014
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting / javadocs
上级
a6c34373
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
48 行增加
和
38 行删除
+48
-38
Database.java
h2/src/main/org/h2/engine/Database.java
+1
-1
MVMap.java
h2/src/main/org/h2/mvstore/MVMap.java
+1
-1
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+8
-8
MVStoreTool.java
h2/src/main/org/h2/mvstore/MVStoreTool.java
+4
-3
Page.java
h2/src/main/org/h2/mvstore/Page.java
+18
-9
MVTable.java
h2/src/main/org/h2/mvstore/db/MVTable.java
+3
-2
LocalResult.java
h2/src/main/org/h2/result/LocalResult.java
+1
-1
TestCompatibility.java
h2/src/test/org/h2/test/db/TestCompatibility.java
+1
-1
TestLob.java
h2/src/test/org/h2/test/db/TestLob.java
+1
-1
TestMultiThread.java
h2/src/test/org/h2/test/db/TestMultiThread.java
+2
-2
TestConcurrent.java
h2/src/test/org/h2/test/store/TestConcurrent.java
+2
-2
TestMVStore.java
h2/src/test/org/h2/test/store/TestMVStore.java
+1
-1
TestIntPerfectHash.java
h2/src/test/org/h2/test/unit/TestIntPerfectHash.java
+2
-2
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+3
-4
没有找到文件。
h2/src/main/org/h2/engine/Database.java
浏览文件 @
c5d33cf2
h2/src/main/org/h2/mvstore/MVMap.java
浏览文件 @
c5d33cf2
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
c5d33cf2
...
...
@@ -168,9 +168,9 @@ public class MVStore {
private
CacheLongKeyLIRS
<
Page
>
cache
;
/**
* The page chunk references cache. The default size is 4 MB, and the
average size is 2 KB.
*
It is split in 16 segments. The stack move distance is 2% of the expected
* number of entries.
* The page chunk references cache. The default size is 4 MB, and the
*
average size is 2 KB. It is split in 16 segments. The stack move distance
*
is 2% of the expected
number of entries.
*/
private
CacheLongKeyLIRS
<
PageChildren
>
cacheChunkRef
;
...
...
@@ -1240,7 +1240,7 @@ public class MVStore {
return
count
;
}
PageChildren
readPageChunkReferences
(
int
mapId
,
long
pos
,
int
parentChunk
)
{
private
PageChildren
readPageChunkReferences
(
int
mapId
,
long
pos
,
int
parentChunk
)
{
if
(
DataUtils
.
getPageType
(
pos
)
==
DataUtils
.
PAGE_TYPE_LEAF
)
{
return
null
;
}
...
...
h2/src/main/org/h2/mvstore/MVStoreTool.java
浏览文件 @
c5d33cf2
...
...
@@ -86,6 +86,7 @@ public class MVStoreTool {
*
* @param fileName the name of the file
* @param writer the print writer
* @param details print the page details
*/
public
static
void
dump
(
String
fileName
,
Writer
writer
,
boolean
details
)
{
PrintWriter
pw
=
new
PrintWriter
(
writer
,
true
);
...
...
h2/src/main/org/h2/mvstore/Page.java
浏览文件 @
c5d33cf2
...
...
@@ -999,14 +999,14 @@ public class Page {
}
/**
* Read the page from the buffer.
* Read an inner node page from the buffer, but ignore the keys and
* values.
*
* @param pos the position
* @param buff the buffer
* @param chunkId the chunk id
* @param fileStore the file store
* @param filePos the position in the file
* @param mapId the map id
* @param
offset the offset within the chunk
* @
param maxLength the maximum length
* @param
pos the position
* @
return the page children object
*/
static
PageChildren
read
(
FileStore
fileStore
,
long
filePos
,
int
mapId
,
long
pos
)
{
ByteBuffer
buff
;
...
...
@@ -1067,10 +1067,19 @@ public class Page {
return
new
PageChildren
(
pos
,
children
);
}
/**
* Only keep one reference to the same chunk. Only leaf references are
* removed (references to inner nodes are not removed, as they could
* indirectly point to other chunks).
*/
void
removeDuplicateChunkReferences
()
{
HashSet
<
Integer
>
chunks
=
New
.
hashSet
();
// we don't need references to leaves in the same chunk
chunks
.
add
(
DataUtils
.
getPageChunkId
(
pos
));
// possible space optimization:
// we could remove more children, for example
// we could remove all leaf references to the same chunk
// if there is also a inner node reference to that chunk
for
(
int
i
=
0
;
i
<
children
.
length
;
i
++)
{
long
p
=
children
[
i
];
if
(
DataUtils
.
getPageType
(
p
)
==
DataUtils
.
PAGE_TYPE_NODE
)
{
...
...
h2/src/main/org/h2/mvstore/db/MVTable.java
浏览文件 @
c5d33cf2
...
...
@@ -52,7 +52,8 @@ public class MVTable extends TableBase {
private
volatile
Session
lockExclusiveSession
;
// using a ConcurrentHashMap as a set
private
final
ConcurrentHashMap
<
Session
,
Session
>
lockSharedSessions
=
new
ConcurrentHashMap
<
Session
,
Session
>();
private
final
ConcurrentHashMap
<
Session
,
Session
>
lockSharedSessions
=
new
ConcurrentHashMap
<
Session
,
Session
>();
/**
* The queue of sessions waiting to lock the table. It is a FIFO queue to
...
...
h2/src/main/org/h2/result/LocalResult.java
浏览文件 @
c5d33cf2
h2/src/test/org/h2/test/db/TestCompatibility.java
浏览文件 @
c5d33cf2
h2/src/test/org/h2/test/db/TestLob.java
浏览文件 @
c5d33cf2
h2/src/test/org/h2/test/db/TestMultiThread.java
浏览文件 @
c5d33cf2
h2/src/test/org/h2/test/store/TestConcurrent.java
浏览文件 @
c5d33cf2
h2/src/test/org/h2/test/store/TestMVStore.java
浏览文件 @
c5d33cf2
h2/src/test/org/h2/test/unit/TestIntPerfectHash.java
浏览文件 @
c5d33cf2
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
c5d33cf2
...
...
@@ -766,6 +766,5 @@ linearly patching perfect hole sip enwiki flooding uniformly recursions happenin
permanently nucleus forbidden student trusted poodle agentlib
jech ladislav cognitect sergey thompson evdokimov arykov mfulton
dimitrijs fedotovs kingdom manley xso latvia ontwikkeling reeve
extendable republic uniquely
datasources accidentally recursing respecting
\ No newline at end of file
extendable republic uniquely datasources accidentally recursing respecting
young sweep
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论