When using the exclusive mode, LOB operations could cause the thread
to block. This also affected the CreateCluster tool (when using BLOB
or CLOB data). version 1.3.168.
I have built a very simple test case showing the issue:
1. Following the cluster creation tutorial, I create two directories:
server1 & server2
2. I run an H2 server on both:
java org.h2.tools.Server -tcp -tcpPort 9101 -baseDir server1
java org.h2.tools.Server -tcp -tcpPort 9102 -baseDir server2
3. I create a new database "test" on the first one, by executing the
following statements:
create table Test(c1 number(5), c2 varchar(100), c3 CLOB);
insert into Test(c1, c2, c3) values (10, 'Hello',
repeat('Hello', 10000));
insert into Test(c1, c2, c3) values (20, 'World',
repeat('World', 10000));
4. I try to create a cluster, by running:
java org.h2.tools.CreateCluster
-urlSource jdbc:h2:tcp://localhost:9101/
test
-urlTarget jdbc:h2:tcp://localhost:9102/test
-user sa
-serverList localhost:9101,localhost:9102
5. The command does not terminate. An empty "backup.sql" file is
created in the current directory.
and the code block at org.h2.engine.Session.waitIfExclusiveModeEnabled
What is wrong there? Is there a workaround?
Thanks!