Hi David,

Are you sure that you are reading the latest (2.1.214) code? There is no 
MVStore.notifyAboutOldestVersion() anymore.
Please make ALL of your testing with 2.1.214, since the area of interest 
was actively modified recently.

Regards,
Andrei

On Thursday, August 4, 2022 at 11:06:53 AM UTC-4 [email protected] wrote:

> Hello,
>
> I made a simple testcase that shows that LOB_TIMEOUT is not working.
> See the attachment. Testcase creates an in-memory db with table with clob 
> column, inserts 2048 records with 1MB clob. After GC, heap is at 2.2GB. 
> Selecting test table for 5000 times increases heap to 4.2GB. After 
> LOB_TIMEOUT=5s nothing happens. Closing connection helps somehow, but maybe 
> because of other reasons.
> Tested mainly on v2.1.212, but also on 2.1.214, and 1.4.199.
>
> Looking at H2 code, resultset LOBs get registered to 
> LobStorageMap#pendingLobRemovals. These are removed in 
> LobStorageMap.cleanup(). This method is called from 
> MVStore.notifyCleaner(), and this one from MVStore.closeStore() and from 
> MVStore.notifyAboutOldestVersion(). The notifyAboutOldestVersion() starts 
> with if containing the 'bufferSaveExecutor != null' condition. But 
> bufferSaveExecutor is only set to non-null value in 
> setAutoCommitDelay(millis) where millis>0. Debugger shows it as null, so 
> cleanup isnt executed.
>
> Am I right?
>
> Teporary solution was to set MAX_LENGTH_INPLACE_LOB=<max lob size>. I 
> assume for in-memory DBs high MAX_LENGTH_INPLACE_LOB values are ok. This 
> solves the heap issues, and makes inserts and selects much much faster. In 
> is also easily applicable, no code fixes, just url update.
>
> Thank you, H2 is still great!
>
> David.
>
>
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/a1dfb328-aaae-4f03-8281-2236b41c5320n%40googlegroups.com.

Reply via email to