Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
faa9789d
提交
faa9789d
authored
6月 17, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix typos and update dictionary.txt
上级
5d27f38d
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
34 行增加
和
29 行删除
+34
-29
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
Command.java
h2/src/main/org/h2/command/Command.java
+1
-1
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+1
-1
MVTable.java
h2/src/main/org/h2/mvstore/db/MVTable.java
+7
-7
CommitDecisionMaker.java
h2/src/main/org/h2/mvstore/tx/CommitDecisionMaker.java
+1
-1
RollbackDecisionMaker.java
h2/src/main/org/h2/mvstore/tx/RollbackDecisionMaker.java
+2
-2
TransactionMap.java
h2/src/main/org/h2/mvstore/tx/TransactionMap.java
+1
-1
TransactionStore.java
h2/src/main/org/h2/mvstore/tx/TransactionStore.java
+6
-6
TxDecisionMaker.java
h2/src/main/org/h2/mvstore/tx/TxDecisionMaker.java
+1
-1
DefaultAuthenticator.java
h2/src/main/org/h2/security/auth/DefaultAuthenticator.java
+1
-1
LdapCredentialsValidator.java
...n/org/h2/security/auth/impl/LdapCredentialsValidator.java
+1
-1
TestAuthentication.java
h2/src/test/org/h2/test/auth/TestAuthentication.java
+4
-4
TestTransactionStore.java
h2/src/test/org/h2/test/store/TestTransactionStore.java
+1
-1
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+6
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
faa9789d
...
...
@@ -33,7 +33,7 @@ Change Log
</li>
<li>
PR #1176: Magic value replacement with constant
</li>
<li>
PR #1171: Introduce last commited value into a VersionedValue
<li>
PR #1171: Introduce last commit
t
ed value into a VersionedValue
</li>
<li>
PR #1175: tighten test conditions - do not ignore any exceptions
</li>
...
...
h2/src/main/org/h2/command/Command.java
浏览文件 @
faa9789d
...
...
@@ -321,7 +321,7 @@ public abstract class Command implements CommandInterface {
if
(
start
!=
0
&&
TimeUnit
.
NANOSECONDS
.
toMillis
(
now
-
start
)
>
session
.
getLockTimeout
())
{
throw
DbException
.
get
(
ErrorCode
.
LOCK_TIMEOUT_1
,
e
);
}
// Only in PageStore mode we need to sleep here to avoid bu
z
y wait loop
// Only in PageStore mode we need to sleep here to avoid bu
s
y wait loop
Database
database
=
session
.
getDatabase
();
if
(
database
.
getMvStore
()
==
null
)
{
int
sleep
=
1
+
MathUtils
.
randomInt
(
10
);
...
...
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
faa9789d
...
...
@@ -2568,7 +2568,7 @@ public class MVStore {
String
oldName
=
getMapName
(
id
);
if
(
oldName
!=
null
&&
!
oldName
.
equals
(
newName
))
{
String
idHexStr
=
Integer
.
toHexString
(
id
);
// we need to cope w
h
ith the case of previously unfinished rename
// we need to cope with the case of previously unfinished rename
String
existingIdHexStr
=
meta
.
get
(
"name."
+
newName
);
DataUtils
.
checkArgument
(
existingIdHexStr
==
null
||
existingIdHexStr
.
equals
(
idHexStr
),
...
...
h2/src/main/org/h2/mvstore/db/MVTable.java
浏览文件 @
faa9789d
...
...
@@ -119,7 +119,7 @@ public class MVTable extends TableBase {
*/
private
final
ArrayDeque
<
Session
>
waitingSessions
=
new
ArrayDeque
<>();
private
final
Trace
traceLock
;
private
final
AtomicInteger
changesUn
it
lAnalyze
;
private
final
AtomicInteger
changesUn
ti
lAnalyze
;
private
int
nextAnalyze
;
private
final
boolean
containsLargeObject
;
private
Column
rowIdColumn
;
...
...
@@ -130,7 +130,7 @@ public class MVTable extends TableBase {
public
MVTable
(
CreateTableData
data
,
MVTableEngine
.
Store
store
)
{
super
(
data
);
nextAnalyze
=
database
.
getSettings
().
analyzeAuto
;
changesUn
it
lAnalyze
=
nextAnalyze
<=
0
?
null
:
new
AtomicInteger
(
nextAnalyze
);
changesUn
ti
lAnalyze
=
nextAnalyze
<=
0
?
null
:
new
AtomicInteger
(
nextAnalyze
);
this
.
store
=
store
;
this
.
transactionStore
=
store
.
getTransactionStore
();
this
.
isHidden
=
data
.
isHidden
;
...
...
@@ -714,8 +714,8 @@ public class MVTable extends TableBase {
Index
index
=
indexes
.
get
(
i
);
index
.
truncate
(
session
);
}
if
(
changesUn
it
lAnalyze
!=
null
)
{
changesUn
it
lAnalyze
.
set
(
nextAnalyze
);
if
(
changesUn
ti
lAnalyze
!=
null
)
{
changesUn
ti
lAnalyze
.
set
(
nextAnalyze
);
}
}
...
...
@@ -745,12 +745,12 @@ public class MVTable extends TableBase {
}
private
void
analyzeIfRequired
(
Session
session
)
{
if
(
changesUn
it
lAnalyze
!=
null
)
{
if
(
changesUn
it
lAnalyze
.
decrementAndGet
()
==
0
)
{
if
(
changesUn
ti
lAnalyze
!=
null
)
{
if
(
changesUn
ti
lAnalyze
.
decrementAndGet
()
==
0
)
{
if
(
nextAnalyze
<=
Integer
.
MAX_VALUE
/
2
)
{
nextAnalyze
*=
2
;
}
changesUn
it
lAnalyze
.
set
(
nextAnalyze
);
changesUn
ti
lAnalyze
.
set
(
nextAnalyze
);
session
.
markTableForAnalyze
(
this
);
}
}
...
...
h2/src/main/org/h2/mvstore/tx/CommitDecisionMaker.java
浏览文件 @
faa9789d
...
...
@@ -28,7 +28,7 @@ final class CommitDecisionMaker extends MVMap.DecisionMaker<VersionedValue> {
assert
decision
==
null
;
if
(
existingValue
==
null
||
// map entry was treated as already committed, and then
// it has been removed by another transaction (commit
ed and closed by now
)
// it has been removed by another transaction (commit
ted and closed by now
)
existingValue
.
getOperationId
()
!=
undoKey
)
{
// this is not a final undo log entry for this key,
// or map entry was treated as already committed and then
...
...
h2/src/main/org/h2/mvstore/tx/RollbackDecisionMaker.java
浏览文件 @
faa9789d
...
...
@@ -30,8 +30,8 @@ final class RollbackDecisionMaker extends MVMap.DecisionMaker<Object[]> {
@Override
public
MVMap
.
Decision
decide
(
Object
[]
existingValue
,
Object
[]
providedValue
)
{
assert
decision
==
null
;
// normaly existingValue will always be there except of db initialization
// where some undo log enty was captured on disk but actual map entry was not
// normal
l
y existingValue will always be there except of db initialization
// where some undo log ent
r
y was captured on disk but actual map entry was not
if
(
existingValue
!=
null
)
{
VersionedValue
valueToRestore
=
(
VersionedValue
)
existingValue
[
2
];
long
operationId
;
...
...
h2/src/main/org/h2/mvstore/tx/TransactionMap.java
浏览文件 @
faa9789d
...
...
@@ -109,7 +109,7 @@ public class TransactionMap<K, V> {
// Entries describing removals from the map by this transaction and all transactions,
// which are committed but not closed yet,
// and
a
ntries about additions to the map by other uncommitted transactions were counted,
// and
e
ntries about additions to the map by other uncommitted transactions were counted,
// but they should not contribute into total count.
if
(
2
*
undoLogSize
>
size
)
{
// the undo log is larger than half of the map - scan the entries of the map directly
...
...
h2/src/main/org/h2/mvstore/tx/TransactionStore.java
浏览文件 @
faa9789d
...
...
@@ -89,7 +89,7 @@ public class TransactionStore {
private
final
AtomicReferenceArray
<
Transaction
>
transactions
=
new
AtomicReferenceArray
<>(
MAX_OPEN_TRANSACTIONS
+
1
);
private
static
final
String
UNDO_LOG_NAME_PEFIX
=
"undoLog"
;
private
static
final
String
UNDO_LOG_NAME_P
R
EFIX
=
"undoLog"
;
private
static
final
char
UNDO_LOG_COMMITTED
=
'-'
;
// must come before open in lexicographical order
private
static
final
char
UNDO_LOG_OPEN
=
'.'
;
...
...
@@ -101,7 +101,7 @@ public class TransactionStore {
public
static
String
getUndoLogName
(
boolean
committed
,
int
transactionId
)
{
return
UNDO_LOG_NAME_PEFIX
+
return
UNDO_LOG_NAME_P
R
EFIX
+
(
committed
?
UNDO_LOG_COMMITTED
:
UNDO_LOG_OPEN
)
+
(
transactionId
>
0
?
String
.
valueOf
(
transactionId
)
:
""
);
}
...
...
@@ -120,7 +120,7 @@ public class TransactionStore {
*
* @param store the store
* @param dataType the data type for map keys and values
* @param timeoutMillis lock aquisition timeout in milliseconds, 0 means no wait
* @param timeoutMillis lock a
c
quisition timeout in milliseconds, 0 means no wait
*/
public
TransactionStore
(
MVStore
store
,
DataType
dataType
,
int
timeoutMillis
)
{
this
.
store
=
store
;
...
...
@@ -143,10 +143,10 @@ public class TransactionStore {
public
void
init
()
{
if
(!
init
)
{
for
(
String
mapName
:
store
.
getMapNames
())
{
if
(
mapName
.
startsWith
(
UNDO_LOG_NAME_PEFIX
))
{
boolean
committed
=
mapName
.
charAt
(
UNDO_LOG_NAME_PEFIX
.
length
())
==
UNDO_LOG_COMMITTED
;
if
(
mapName
.
startsWith
(
UNDO_LOG_NAME_P
R
EFIX
))
{
boolean
committed
=
mapName
.
charAt
(
UNDO_LOG_NAME_P
R
EFIX
.
length
())
==
UNDO_LOG_COMMITTED
;
if
(
store
.
hasData
(
mapName
)
||
committed
)
{
int
transactionId
=
Integer
.
parseInt
(
mapName
.
substring
(
UNDO_LOG_NAME_PEFIX
.
length
()
+
1
));
int
transactionId
=
Integer
.
parseInt
(
mapName
.
substring
(
UNDO_LOG_NAME_P
R
EFIX
.
length
()
+
1
));
VersionedBitSet
openTxBitSet
=
openTransactions
.
get
();
if
(!
openTxBitSet
.
get
(
transactionId
))
{
Object
[]
data
=
preparedTransactions
.
get
(
transactionId
);
...
...
h2/src/main/org/h2/mvstore/tx/TxDecisionMaker.java
浏览文件 @
faa9789d
...
...
@@ -49,7 +49,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
logIt
(
existingValue
.
value
==
null
?
null
:
VersionedValue
.
getInstance
(
existingValue
.
value
));
decision
=
MVMap
.
Decision
.
PUT
;
}
else
if
(
fetchTransaction
(
blockingId
)
==
null
)
{
// condition above means transaction has been committed/r
p
lled back and closed by now
// condition above means transaction has been committed/r
o
lled back and closed by now
decision
=
MVMap
.
Decision
.
REPEAT
;
}
else
{
// this entry comes from a different transaction, and this
...
...
h2/src/main/org/h2/security/auth/DefaultAuthenticator.java
浏览文件 @
faa9789d
...
...
@@ -163,7 +163,7 @@ public class DefaultAuthenticator implements Authenticator {
}
/**
* Initializes the authenticator
(it is called by AuthententicationManager)
* Initializes the authenticator
.
*
* this method is skipped if skipDefaultInitialization is set Order of
* initialization is
...
...
h2/src/main/org/h2/security/auth/impl/LdapCredentialsValidator.java
浏览文件 @
faa9789d
...
...
@@ -24,7 +24,7 @@ import org.h2.security.auth.ConfigProperties;
* <li>bindDnPattern bind dn pattern with %u instead of username
* (example: uid=%u,ou=users,dc=example,dc=com)</li>
* <li>host ldap server</li>
* <li>port of ldap service; optional, by default 389 for
u
nsecure, 636 for secure</li>
* <li>port of ldap service; optional, by default 389 for
i
nsecure, 636 for secure</li>
* <li>secure, optional by default is true (use SSL)</li>
* </ul>
*/
...
...
h2/src/test/org/h2/test/auth/TestAuthentication.java
浏览文件 @
faa9789d
...
...
@@ -126,7 +126,7 @@ public class TestAuthentication extends TestBase {
protected
void
allTests
()
throws
Exception
{
testInvalidPassword
();
testExternalUserWihoutRealm
();
testExternalUserWi
t
houtRealm
();
testExternalUser
();
testAssignRealNameRole
();
testStaticRole
();
...
...
@@ -146,7 +146,7 @@ public class TestAuthentication extends TestBase {
}
}
protected
void
testExternalUserWihoutRealm
()
throws
Exception
{
protected
void
testExternalUserWi
t
houtRealm
()
throws
Exception
{
try
{
Connection
wrongLoginConnection
=
DriverManager
.
getConnection
(
getDatabaseURL
(),
getExternalUser
(),
getExternalUserPassword
());
...
...
@@ -265,8 +265,8 @@ public class TestAuthentication extends TestBase {
try
{
try
{
testExternalUser
();
throw
new
Exception
(
"External user shouldnt be allowed"
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"External user shouldn
'
t be allowed"
);
}
catch
(
Exception
e
)
{
}
}
finally
{
configureAuthentication
(
database
);
...
...
h2/src/test/org/h2/test/store/TestTransactionStore.java
浏览文件 @
faa9789d
...
...
@@ -404,7 +404,7 @@ public class TestTransactionStore extends TestBase {
}
}
// re-open TransactionStore, because we rolled back
// underlying MVStore without rolling back TranactionStore
// underlying MVStore without rolling back Tran
s
actionStore
s
.
close
();
s
=
MVStore
.
open
(
fileName
);
ts
=
new
TransactionStore
(
s
);
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
faa9789d
...
...
@@ -777,4 +777,9 @@ geometries sourceschema destschema generatedcolumn alphanumerically usages
sizable instantiates renders sdt txcommit unhelpful optimiser treats rejects referring untrusted computes vacate inverted
reordered colliding evgenij archaic invocations apostrophe hypothetically testref ryazanov useless completes highlighting tends degrade
summands minuend subtrahend
summands minuend subtrahend localtime localtimestamp governs unfinished pressure closure discovered victim seemingly
flaw capture coherent removals silence opentransactions picture tokar mailto andrei dur discarded blocker captures txdm
intentionally authenticator authrealm ventura credentials alessandro validator acquisition vital mariadb preventing
ewkt ewkb informations authzpwd realms mappers jaxb realmname configurationfile unmarshal jaas externals customize
authenticators appname interrogate metatable barrier preliminary staticuser staticpassword unregistered inquiry
ldapexample remoteuser assignments djava validators mock relate mapid tighten
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论