db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5151) Don't leak unused identity/sequence values on abnormal exit.
Date Mon, 05 Sep 2011 07:33:09 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Waagan updated DERBY-5151:
-----------------------------------

    Issue & fix info:   (was: [Patch Available])

Clearing patch available flag - it doesn't seem to be ready for review/commit due to lack
of consensus (I also spotted a place where 'canCycle' was used instead of 'canCache').

Mark (the reporter) writes he is fine with closing the issue. Do people agree that's the right
course of action, or should we keep it open because there is work to be done on this issue?

> Don't leak unused identity/sequence values on abnormal exit.
> ------------------------------------------------------------
>
>                 Key: DERBY-5151
>                 URL: https://issues.apache.org/jira/browse/DERBY-5151
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Mark Holster
>         Attachments: sequence-no-cache.patch
>
>
> Currently, a sequence in Derby always uses a pre allocating cache. I'm working on an
usecase which requires a number to increase with a fixed value. The usecase fails after a
restart because of the pre allocating cache.
> I've created a patch that adds the options CACHE | NO CACHE to the create sequence statement.
When no cache is provided, the pre allocating cache size will be set to 1, which results in
a "no cache sequence".
> I've followed the CYCLE | NO CYCLE code as much as possible. Tested it in my own app
and it seems to work fine.
> RH: Note that part of this issue has been addressed by the work on DERBY-4437. Sequence
values will NOT leak now if you perform an orderly shutdown of your database. However, values
still leak if the VM exits before the database has been shutdown. I have changed this issue's
title to indicate that the remaining work applies to both sequences and identity columns.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message