Constructor, public Database(ConnectionInfo ci, String cipher) where all
the URL options are parsed never parses for the 'LOCK_MODE' option. Thus
never changes the default value for Database.lockMode which is
Constants.DEFAULT_LOCK_MODE (3).
Patrick
On Wednesday, January 3, 2018 at 3:17:31 PM UTC-8, Patrick H wrote:
>
> I believe this to be the problem.
>
>
> File: MVTable.java
> public boolean lock(Session session, boolean exclusive,
> boolean forceLockEvenInMvcc) {
> int lockMode = database.getLockMode();
> if (lockMode == Constants.LOCK_MODE_OFF) {
> return false;
> }
>
>
> database.getLockMode() is returning '3' as opposed to '0'.
>
>
> I'm trying to determine if LOCK_MODE=0 is passed to the database object.
>
>
>
> Patrick
>
>
> On Wednesday, January 3, 2018 at 11:33:54 AM UTC-8, Patrick H wrote:
>>
>> Hello,
>>
>> I am using:
>>
>> java -Xmx4096m -Xverify:none -cp %CLASSPATH%\h2-1.4.196.jar
>> org.h2.tools.RunScript -url
>> "jdbc:h2:nioMapped:~/%DB_NAME%;LOCK_MODE=0;TRACE_LEVEL_FILE=3;UNDO_LOG=0"
>> -user "admin" -password "admin" -script "D:/dev/sql/sqlscript.sql"
>>
>> and "sqlscript.sql' has a hundred or more: RUNSCRIPT FROM
>> '<filename.sql>';
>>
>> Basically, I have a master run script running hundreds of sub-RUNSCRIPT.
>> The objective of my master/sub-scripts it to bulk load data.
>>
>> And when I review the log file, database.trace.db, it contains hundreds
>> of LOCKS.
>>
>> For example:
>>
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock unlock SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock unlock SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock unlock SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock unlock SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock unlock SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock unlock SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock unlock SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock requesting for SYS
>> 2018-01-03 11:04:28 lock: 1 exclusive write lock added for SYS
>> ...
>> ...
>> ...
>>
>> Can anyone please explain why locks are still happening with LOCK_MODE=0?
>>
>>
>> Thanks,
>>
>> Patrick
>>
>>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.