You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2013/11/01 16:35:19 UTC

[jira] [Commented] (DERBY-6398) SYSCS_FREEZE_DATABASE locks-up if there are large records that haven't been flushed to the disk

    [ https://issues.apache.org/jira/browse/DERBY-6398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811362#comment-13811362 ] 

Knut Anders Hatlen commented on DERBY-6398:
-------------------------------------------

Thanks!

It looks like it's the auto-commit that is performed after the freeze operation that's blocked when it attempts to flush the transaction log. (It could also be the auto-commit that's performed right before the freeze operation. Cannot tell from the stack trace since the Derby part of it doesn't have line numbers. But I cannot see how that could happen unless syscs_freeze_database() is called on an already frozen database, so I'll assume that it's the auto-commit after freeze.)

I stepped through the freeze code in a debugger, and in my test cases the auto-commit never got to the point where it found it necessary to flush the log. I think the only transactional work that's done during a freeze operation is checkpointing of the database right before the freeze. But that work is done in a nested transaction that is committed separately before the database moves to the frozen state, and shouldn't make it necessary for the main transaction to write anything to the log after the database has been frozen. So I've not jet figured out how to get the database into that state.

> SYSCS_FREEZE_DATABASE locks-up if there are large records that haven't been flushed to the disk
> -----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6398
>                 URL: https://issues.apache.org/jira/browse/DERBY-6398
>             Project: Derby
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions: 10.10.1.1
>         Environment: Reliably demonstrated on Windows 7 with JDK 1.6.0_31
>            Reporter: Marty Backe
>             Fix For: 10.10.1.1
>
>         Attachments: report.txt
>
>
> If after writing a record that contains a large data column (>100KB), the FREEZE command is issued, the command never returns (Derby appears to be dead-locked).
> E.g. sqlStatement.executeUpdate("CALL SYSCS_UTIL.SYSCS_FREEZE_DATABASE()");
> If the CALL SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE() command is first used before calling FREEZE, it does not lock-up.
> It's my opinion that calling FREEZE should never result in a dead-locked Derby instance.



--
This message was sent by Atlassian JIRA
(v6.1#6144)