Re: [h2] Re: File corruption with nioMemLZF

2017-01-23 Thread Anatolii K
One more problem :( : It happens rarely and unpredictable Caused by: java.lang.ClassCastException: org.h2.value.ValueNull cannot be cast to org.h2.value.ValueArray at org.h2.mvstore.db.MVPrimaryIndex$MVStoreCursor.get(MVPrimaryIndex.java:402) at

Re: [h2] Re: File corruption with nioMemLZF

2017-01-21 Thread Anatolii K
I found one more scenario where compressed database is 30 times slower - see attachment But now it's not related to synchronization because the test is single threaded -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this

Re: [h2] Re: File corruption with nioMemLZF

2017-01-20 Thread Anatolii K
Have you aready commited at github? I don't see it On Friday, January 20, 2017 at 2:26:20 PM UTC, Noel Grandin wrote: > > I have pushed a fix for this. > > On 2017/01/20 2:23 PM, Anatolii K wrote: > > Please see attached. > > > > At my notebook the test takes 0.

Re: [h2] Re: File corruption with nioMemLZF

2017-01-20 Thread Anatolii K
Please see attached. At my notebook the test takes 0.9s without compression and 50s with compression On Thursday, January 19, 2017 at 5:51:36 PM UTC, Noel Grandin wrote: > > Can you post your performance test code? > On Thu, 19 Jan 2017 at 18:36, Anatolii K <a.ka...@gmail.co

Re: [h2] Re: File corruption with nioMemLZF

2017-01-19 Thread Anatolii K
Sorry to say so, but performance dropped dramatically. Previously compressed storage was just a bit slower than uncompressed. But now it become almost 100 times slower! On Thursday, January 19, 2017 at 1:32:49 PM UTC, Noel Grandin wrote: > > I have pushed a fix for this, it now survives your

[h2] Re: File corruption with nioMemLZF

2017-01-19 Thread Anatolii K
Sorry for bothering you, but could you please look at it -- 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 h2-database+unsubscr...@googlegroups.com. To post to

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2017-01-02 Thread Anatolii K
I created separate topic for this bug https://groups.google.com/forum/#!topic/h2-database/rhSoRhzeZzk -- 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

[h2] File corruption with nioMemLZF

2017-01-02 Thread Anatolii K
Continuation of https://groups.google.com/forum/#!topic/h2-database/oHpaE_LMLz4 I'm getting following error with nioMemLZF (url= jdbc:h2:nioMemLZF:db): org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: File corrupted in chunk 28, expected page length 4..32, got

[h2] Re: table partitioning

2017-01-02 Thread Anatolii K
+1 vote for partitioning I hope partitioning will improve insert/update scalability. In current implementation I see huge contention on table's MVMap -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-22 Thread Anatolii K
raf wrote: > > Hi, > > I didn't see a failure either. > > Regards, > Thomas > > > On Thu, Dec 22, 2016 at 10:13 AM, Noel Grandin <noelg...@gmail.com > > wrote: > >> >> >> On 2016/12/21 7:24 PM, Anatolii K wrote: >> >>> Test at

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
Test attached On Wednesday, December 21, 2016 at 8:41:44 PM UTC+5, Thomas Mueller Graf wrote: > > Hi, > > I guess that bug would be on my plate... I recently made changes there > (trying to improve concurrency). I'm sorry about that. Having a test case > would be great! > > Regards, > Thomas >

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
org.h2.jdbc.JdbcSQLException: General error: "java.nio.BufferUnderflowException"; SQL statement: UPDATE account set balance = ? where id = ? [5-193] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
The bug is reproduced only in multi-thread application On Wednesday, December 21, 2016 at 8:41:44 PM UTC+5, Thomas Mueller Graf wrote: > > Hi, > > I guess that bug would be on my plate... I recently made changes there > (trying to improve concurrency). I'm sorry about that. Having a test case

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
Without split it also failed (url jdbc:h2:nioMemLZF:db): Caused by: java.nio.BufferUnderflowException at java.nio.Buffer.nextGetIndex(Buffer.java:500) On Wednesday, December 21, 2016 at 7:50:31 PM UTC+5, Noel Grandin wrote: > > then let's fix that problem, but I'm not really keen on trying to

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
I have very big in-memory database ~ 1TB. Without split H2 crashes On Wednesday, December 21, 2016 at 7:43:13 PM UTC+5, Noel Grandin wrote: > > I'm sorry, but that's just a silly combination to be using. > > You should only using be "split:" for FAT filesystems, and you should > certainly not

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
e.java:217) at org.h2.mvstore.MVMap.binarySearch(MVMap.java:470) at org.h2.mvstore.MVMap.binarySearch(MVMap.java:471) at org.h2.mvstore.MVMap.get(MVMap.java:452) On Wednesday, December 21, 2016 at 4:01:40 PM UTC+5, Anatolii K wrote: > > Thank you for quick help! > > On Wednesday, December

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
Thank you for quick help! On Wednesday, December 21, 2016 at 3:55:32 PM UTC+5, Noel Grandin wrote: > > It appears I was wrong about this, we already implement reading/writing > without synchronisation for all of our other > file implementations, I just missed that you are using the "split:"

[h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-20 Thread Anatolii K
Hi I see a lot of thread blocked at java.lang.Thread.State: BLOCKED (on object monitor) at org.h2.store.fs.FileBase.read(FileBase.java:39) - waiting to lock <0x0006f1dfcdd0> (a org.h2.store.fs.FileSplit) at org.h2.mvstore.DataUtils.readFully(DataUtils.java:421) at

Re: [h2] SELECT FOR UPDATE does not work with MERGE

2016-12-20 Thread Anatolii K
Really? It seems to work with UPDATE. I tested it with H2 console and using attached test with UPDATE instead of MERGE If SELECT FOR UPDATE doesn't work what On Tuesday, December 20, 2016 at 2:30:45 PM UTC+5, Noel Grandin wrote: > > SELECT FOR UPDATE doesn't actually do anything useful in

[h2] SELECT FOR UPDATE does not work with MERGE

2016-12-20 Thread Anatolii K
Hi Please see attached file: I added method testConcurrentMergeDeadlock() to existing test. This test failed with error ... Caused by: java.lang.IllegalStateException: Entry is locked [1.4.193/101] at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:766) The same test with

Re: [h2] Re: Multithread insert performance issue

2016-12-11 Thread Anatolii K
In fact this test shows 3 problems: 1. Bad scalabity even with embedded server: H2 can't use more then 10% of PU due to locking 2. Slow TCP exchange even with localhost 3. Degradation of TCP server performance, probably due to a leak I would very appreciate your input for each of the problems

[h2] Re: Multithread insert performance issue

2016-12-11 Thread Anatolii K
Test attached -- 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 h2-database+unsubscr...@googlegroups.com. To post to this group, send email to

[h2] Multithread insert performance issue

2016-12-11 Thread Anatolii K
Hi I run attached test at AWS r3.8xlarge instance (32 core, 256 GB RAM). The test has 100 threads which perform inserts into one simple table *Test #1 - TCP server* dbUrl = "jdbc:h2:tcp://localhost:9002/nioMemFS:db;DB_CLOSE_DELAY=-1;MULTI_THREADED=1" At the very beginning I get 25K

Re: [h2] NullPointerException at concurrent updates (MULTI_THREADED)

2016-12-11 Thread Anatolii K
Thank you sir! -- 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 h2-database+unsubscr...@googlegroups.com. To post to this group, send email to

[h2] NullPointerException at concurrent updates (MULTI_THREADED)

2016-12-09 Thread Anatolii K
Hi I've attached test which generates the exception if MULTI_THREADED=1: Caused by: java.lang.NullPointerException at org.h2.mvstore.db.MVPrimaryIndex.getRow(MVPrimaryIndex.java:217) at org.h2.mvstore.db.MVTable.getRow(MVTable.java:463) at

Re: [h2] "Unique index or primary key violation" at concurrent insers (MULTI_THREADED)

2016-12-09 Thread Anatolii K
Great, thanks! > > > -- 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 h2-database+unsubscr...@googlegroups.com. To post to this group, send email to

[h2] "Unique index or primary key violation" at concurrent insers (MULTI_THREADED)

2016-12-08 Thread Anatolii K
Hi I've attached test which generates the exception if MULTI_THREADED=1: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.TRAN"; SQL statement: INSERT INTO tran (id) values(?) [23505-193] at