db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6790) SYSCS_UTIL.SYSCS_PEEK_AT_IDENTITY increase to 100 after restart AD Network Server
Date Fri, 30 Jan 2015 14:44:34 GMT

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

Bryan Pendleton commented on DERBY-6790:
----------------------------------------

I think that this is due to DERBY-6542, which changed the generated column behavior to
generate values using sequences, rather than using the autoincrement value in syscolumns.

It sounds like you aren't shutting down Derby cleanly when you restart.

As documented here: http://db.apache.org/derby/docs/10.11/ref/rrefproperpreallocator.html#rrefproperpreallocator

    If the database is shut down in an orderly fashion, Derby will not leak 
    unused preallocated values. Instead, any unused values will be thrown 
    away, and the sequence generator will continue where it left off once 
    the database reboots. However, if the database exits unexpectedly, 
    the sequence generator will skip the unused preallocated values 
    when the database comes up again. This will leave a gap between 
    the last NEXT VALUE FOR (issued before the database exited
     unexpectedly) and the next NEXT VALUE FOR (issued after 
    the database reboots).



> SYSCS_UTIL.SYSCS_PEEK_AT_IDENTITY increase to 100 after restart AD Network Server
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-6790
>                 URL: https://issues.apache.org/jira/browse/DERBY-6790
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client, Network Server
>    Affects Versions: 10.11.1.1
>            Reporter: Andrey Svininykh
>            Priority: Critical
>
> After restart application, the counter of generated column value increase to 100 after
each restarting. 
> My table:
> CREATE TABLE TICKETSNUM (ID INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT
BY 1)); INSERT INTO TICKETSNUM VALUES (DEFAULT);
> Get counter:
> VALUES SYSCS_UTIL.SYSCS_PEEK_AT_IDENTITY('APP', 'TICKETSNUM');



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message