提交 faa9789d authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Fix typos and update dictionary.txt

上级 5d27f38d
...@@ -33,7 +33,7 @@ Change Log ...@@ -33,7 +33,7 @@ Change Log
</li> </li>
<li>PR #1176: Magic value replacement with constant <li>PR #1176: Magic value replacement with constant
</li> </li>
<li>PR #1171: Introduce last commited value into a VersionedValue <li>PR #1171: Introduce last committed value into a VersionedValue
</li> </li>
<li>PR #1175: tighten test conditions - do not ignore any exceptions <li>PR #1175: tighten test conditions - do not ignore any exceptions
</li> </li>
......
...@@ -321,7 +321,7 @@ public abstract class Command implements CommandInterface { ...@@ -321,7 +321,7 @@ public abstract class Command implements CommandInterface {
if (start != 0 && TimeUnit.NANOSECONDS.toMillis(now - start) > session.getLockTimeout()) { if (start != 0 && TimeUnit.NANOSECONDS.toMillis(now - start) > session.getLockTimeout()) {
throw DbException.get(ErrorCode.LOCK_TIMEOUT_1, e); throw DbException.get(ErrorCode.LOCK_TIMEOUT_1, e);
} }
// Only in PageStore mode we need to sleep here to avoid buzy wait loop // Only in PageStore mode we need to sleep here to avoid busy wait loop
Database database = session.getDatabase(); Database database = session.getDatabase();
if (database.getMvStore() == null) { if (database.getMvStore() == null) {
int sleep = 1 + MathUtils.randomInt(10); int sleep = 1 + MathUtils.randomInt(10);
......
...@@ -2568,7 +2568,7 @@ public class MVStore { ...@@ -2568,7 +2568,7 @@ public class MVStore {
String oldName = getMapName(id); String oldName = getMapName(id);
if (oldName != null && !oldName.equals(newName)) { if (oldName != null && !oldName.equals(newName)) {
String idHexStr = Integer.toHexString(id); String idHexStr = Integer.toHexString(id);
// we need to cope whith the case of previously unfinished rename // we need to cope with the case of previously unfinished rename
String existingIdHexStr = meta.get("name." + newName); String existingIdHexStr = meta.get("name." + newName);
DataUtils.checkArgument( DataUtils.checkArgument(
existingIdHexStr == null || existingIdHexStr.equals(idHexStr), existingIdHexStr == null || existingIdHexStr.equals(idHexStr),
......
...@@ -119,7 +119,7 @@ public class MVTable extends TableBase { ...@@ -119,7 +119,7 @@ public class MVTable extends TableBase {
*/ */
private final ArrayDeque<Session> waitingSessions = new ArrayDeque<>(); private final ArrayDeque<Session> waitingSessions = new ArrayDeque<>();
private final Trace traceLock; private final Trace traceLock;
private final AtomicInteger changesUnitlAnalyze; private final AtomicInteger changesUntilAnalyze;
private int nextAnalyze; private int nextAnalyze;
private final boolean containsLargeObject; private final boolean containsLargeObject;
private Column rowIdColumn; private Column rowIdColumn;
...@@ -130,7 +130,7 @@ public class MVTable extends TableBase { ...@@ -130,7 +130,7 @@ public class MVTable extends TableBase {
public MVTable(CreateTableData data, MVTableEngine.Store store) { public MVTable(CreateTableData data, MVTableEngine.Store store) {
super(data); super(data);
nextAnalyze = database.getSettings().analyzeAuto; nextAnalyze = database.getSettings().analyzeAuto;
changesUnitlAnalyze = nextAnalyze <= 0 ? null : new AtomicInteger(nextAnalyze); changesUntilAnalyze = nextAnalyze <= 0 ? null : new AtomicInteger(nextAnalyze);
this.store = store; this.store = store;
this.transactionStore = store.getTransactionStore(); this.transactionStore = store.getTransactionStore();
this.isHidden = data.isHidden; this.isHidden = data.isHidden;
...@@ -714,8 +714,8 @@ public class MVTable extends TableBase { ...@@ -714,8 +714,8 @@ public class MVTable extends TableBase {
Index index = indexes.get(i); Index index = indexes.get(i);
index.truncate(session); index.truncate(session);
} }
if (changesUnitlAnalyze != null) { if (changesUntilAnalyze != null) {
changesUnitlAnalyze.set(nextAnalyze); changesUntilAnalyze.set(nextAnalyze);
} }
} }
...@@ -745,12 +745,12 @@ public class MVTable extends TableBase { ...@@ -745,12 +745,12 @@ public class MVTable extends TableBase {
} }
private void analyzeIfRequired(Session session) { private void analyzeIfRequired(Session session) {
if (changesUnitlAnalyze != null) { if (changesUntilAnalyze != null) {
if (changesUnitlAnalyze.decrementAndGet() == 0) { if (changesUntilAnalyze.decrementAndGet() == 0) {
if (nextAnalyze <= Integer.MAX_VALUE / 2) { if (nextAnalyze <= Integer.MAX_VALUE / 2) {
nextAnalyze *= 2; nextAnalyze *= 2;
} }
changesUnitlAnalyze.set(nextAnalyze); changesUntilAnalyze.set(nextAnalyze);
session.markTableForAnalyze(this); session.markTableForAnalyze(this);
} }
} }
......
...@@ -28,7 +28,7 @@ final class CommitDecisionMaker extends MVMap.DecisionMaker<VersionedValue> { ...@@ -28,7 +28,7 @@ final class CommitDecisionMaker extends MVMap.DecisionMaker<VersionedValue> {
assert decision == null; assert decision == null;
if (existingValue == null || if (existingValue == null ||
// map entry was treated as already committed, and then // map entry was treated as already committed, and then
// it has been removed by another transaction (commited and closed by now ) // it has been removed by another transaction (committed and closed by now)
existingValue.getOperationId() != undoKey) { existingValue.getOperationId() != undoKey) {
// this is not a final undo log entry for this key, // this is not a final undo log entry for this key,
// or map entry was treated as already committed and then // or map entry was treated as already committed and then
......
...@@ -30,8 +30,8 @@ final class RollbackDecisionMaker extends MVMap.DecisionMaker<Object[]> { ...@@ -30,8 +30,8 @@ final class RollbackDecisionMaker extends MVMap.DecisionMaker<Object[]> {
@Override @Override
public MVMap.Decision decide(Object[] existingValue, Object[] providedValue) { public MVMap.Decision decide(Object[] existingValue, Object[] providedValue) {
assert decision == null; assert decision == null;
// normaly existingValue will always be there except of db initialization // normally existingValue will always be there except of db initialization
// where some undo log enty was captured on disk but actual map entry was not // where some undo log entry was captured on disk but actual map entry was not
if (existingValue != null ) { if (existingValue != null ) {
VersionedValue valueToRestore = (VersionedValue) existingValue[2]; VersionedValue valueToRestore = (VersionedValue) existingValue[2];
long operationId; long operationId;
......
...@@ -109,7 +109,7 @@ public class TransactionMap<K, V> { ...@@ -109,7 +109,7 @@ public class TransactionMap<K, V> {
// Entries describing removals from the map by this transaction and all transactions, // Entries describing removals from the map by this transaction and all transactions,
// which are committed but not closed yet, // which are committed but not closed yet,
// and antries about additions to the map by other uncommitted transactions were counted, // and entries about additions to the map by other uncommitted transactions were counted,
// but they should not contribute into total count. // but they should not contribute into total count.
if (2 * undoLogSize > size) { if (2 * undoLogSize > size) {
// the undo log is larger than half of the map - scan the entries of the map directly // the undo log is larger than half of the map - scan the entries of the map directly
......
...@@ -89,7 +89,7 @@ public class TransactionStore { ...@@ -89,7 +89,7 @@ public class TransactionStore {
private final AtomicReferenceArray<Transaction> transactions = private final AtomicReferenceArray<Transaction> transactions =
new AtomicReferenceArray<>(MAX_OPEN_TRANSACTIONS + 1); new AtomicReferenceArray<>(MAX_OPEN_TRANSACTIONS + 1);
private static final String UNDO_LOG_NAME_PEFIX = "undoLog"; private static final String UNDO_LOG_NAME_PREFIX = "undoLog";
private static final char UNDO_LOG_COMMITTED = '-'; // must come before open in lexicographical order private static final char UNDO_LOG_COMMITTED = '-'; // must come before open in lexicographical order
private static final char UNDO_LOG_OPEN = '.'; private static final char UNDO_LOG_OPEN = '.';
...@@ -101,7 +101,7 @@ public class TransactionStore { ...@@ -101,7 +101,7 @@ public class TransactionStore {
public static String getUndoLogName(boolean committed, int transactionId) { public static String getUndoLogName(boolean committed, int transactionId) {
return UNDO_LOG_NAME_PEFIX + return UNDO_LOG_NAME_PREFIX +
(committed ? UNDO_LOG_COMMITTED : UNDO_LOG_OPEN) + (committed ? UNDO_LOG_COMMITTED : UNDO_LOG_OPEN) +
(transactionId > 0 ? String.valueOf(transactionId) : ""); (transactionId > 0 ? String.valueOf(transactionId) : "");
} }
...@@ -120,7 +120,7 @@ public class TransactionStore { ...@@ -120,7 +120,7 @@ public class TransactionStore {
* *
* @param store the store * @param store the store
* @param dataType the data type for map keys and values * @param dataType the data type for map keys and values
* @param timeoutMillis lock aquisition timeout in milliseconds, 0 means no wait * @param timeoutMillis lock acquisition timeout in milliseconds, 0 means no wait
*/ */
public TransactionStore(MVStore store, DataType dataType, int timeoutMillis) { public TransactionStore(MVStore store, DataType dataType, int timeoutMillis) {
this.store = store; this.store = store;
...@@ -143,10 +143,10 @@ public class TransactionStore { ...@@ -143,10 +143,10 @@ public class TransactionStore {
public void init() { public void init() {
if (!init) { if (!init) {
for (String mapName : store.getMapNames()) { for (String mapName : store.getMapNames()) {
if (mapName.startsWith(UNDO_LOG_NAME_PEFIX)) { if (mapName.startsWith(UNDO_LOG_NAME_PREFIX)) {
boolean committed = mapName.charAt(UNDO_LOG_NAME_PEFIX.length()) == UNDO_LOG_COMMITTED; boolean committed = mapName.charAt(UNDO_LOG_NAME_PREFIX.length()) == UNDO_LOG_COMMITTED;
if (store.hasData(mapName) || 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_PREFIX.length() + 1));
VersionedBitSet openTxBitSet = openTransactions.get(); VersionedBitSet openTxBitSet = openTransactions.get();
if (!openTxBitSet.get(transactionId)) { if (!openTxBitSet.get(transactionId)) {
Object[] data = preparedTransactions.get(transactionId); Object[] data = preparedTransactions.get(transactionId);
......
...@@ -49,7 +49,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue ...@@ -49,7 +49,7 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
logIt(existingValue.value == null ? null : VersionedValue.getInstance(existingValue.value)); logIt(existingValue.value == null ? null : VersionedValue.getInstance(existingValue.value));
decision = MVMap.Decision.PUT; decision = MVMap.Decision.PUT;
} else if(fetchTransaction(blockingId) == null) { } else if(fetchTransaction(blockingId) == null) {
// condition above means transaction has been committed/rplled back and closed by now // condition above means transaction has been committed/rolled back and closed by now
decision = MVMap.Decision.REPEAT; decision = MVMap.Decision.REPEAT;
} else { } else {
// this entry comes from a different transaction, and this // this entry comes from a different transaction, and this
......
...@@ -163,7 +163,7 @@ public class DefaultAuthenticator implements Authenticator { ...@@ -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 * this method is skipped if skipDefaultInitialization is set Order of
* initialization is * initialization is
......
...@@ -24,7 +24,7 @@ import org.h2.security.auth.ConfigProperties; ...@@ -24,7 +24,7 @@ import org.h2.security.auth.ConfigProperties;
* <li>bindDnPattern bind dn pattern with %u instead of username * <li>bindDnPattern bind dn pattern with %u instead of username
* (example: uid=%u,ou=users,dc=example,dc=com)</li> * (example: uid=%u,ou=users,dc=example,dc=com)</li>
* <li>host ldap server</li> * <li>host ldap server</li>
* <li>port of ldap service; optional, by default 389 for unsecure, 636 for secure</li> * <li>port of ldap service; optional, by default 389 for insecure, 636 for secure</li>
* <li>secure, optional by default is true (use SSL)</li> * <li>secure, optional by default is true (use SSL)</li>
* </ul> * </ul>
*/ */
......
...@@ -126,7 +126,7 @@ public class TestAuthentication extends TestBase { ...@@ -126,7 +126,7 @@ public class TestAuthentication extends TestBase {
protected void allTests() throws Exception { protected void allTests() throws Exception {
testInvalidPassword(); testInvalidPassword();
testExternalUserWihoutRealm(); testExternalUserWithoutRealm();
testExternalUser(); testExternalUser();
testAssignRealNameRole(); testAssignRealNameRole();
testStaticRole(); testStaticRole();
...@@ -146,7 +146,7 @@ public class TestAuthentication extends TestBase { ...@@ -146,7 +146,7 @@ public class TestAuthentication extends TestBase {
} }
} }
protected void testExternalUserWihoutRealm() throws Exception { protected void testExternalUserWithoutRealm() throws Exception {
try { try {
Connection wrongLoginConnection = DriverManager.getConnection(getDatabaseURL(), getExternalUser(), Connection wrongLoginConnection = DriverManager.getConnection(getDatabaseURL(), getExternalUser(),
getExternalUserPassword()); getExternalUserPassword());
...@@ -265,8 +265,8 @@ public class TestAuthentication extends TestBase { ...@@ -265,8 +265,8 @@ public class TestAuthentication extends TestBase {
try { try {
try { try {
testExternalUser(); testExternalUser();
throw new Exception("External user shouldnt be allowed"); throw new Exception("External user shouldn't be allowed");
}catch (Exception e) { } catch (Exception e) {
} }
} finally { } finally {
configureAuthentication(database); configureAuthentication(database);
......
...@@ -404,7 +404,7 @@ public class TestTransactionStore extends TestBase { ...@@ -404,7 +404,7 @@ public class TestTransactionStore extends TestBase {
} }
} }
// re-open TransactionStore, because we rolled back // re-open TransactionStore, because we rolled back
// underlying MVStore without rolling back TranactionStore // underlying MVStore without rolling back TransactionStore
s.close(); s.close();
s = MVStore.open(fileName); s = MVStore.open(fileName);
ts = new TransactionStore(s); ts = new TransactionStore(s);
......
...@@ -777,4 +777,9 @@ geometries sourceschema destschema generatedcolumn alphanumerically usages ...@@ -777,4 +777,9 @@ geometries sourceschema destschema generatedcolumn alphanumerically usages
sizable instantiates renders sdt txcommit unhelpful optimiser treats rejects referring untrusted computes vacate inverted 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 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论