You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Rainer Döbele (JIRA)" <em...@incubator.apache.org> on 2013/02/04 15:12:15 UTC

[jira] [Closed] (EMPIREDB-81) endless loop in DBSeqTable#getNextValue()

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

Rainer Döbele closed EMPIREDB-81.
---------------------------------


Cleanup of unclosed issues.
                
> endless loop in DBSeqTable#getNextValue()
> -----------------------------------------
>
>                 Key: EMPIREDB-81
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-81
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.0.6-incubating
>         Environment: linux (debian) + postgre sql 8.3 and 8.4
>            Reporter: Eike Kettner
>            Assignee: Rainer Döbele
>             Fix For: empire-db-2.1.0-incubating
>
>
> I use postgre sql and getting the next sequence value, the getNextValue() goes into an endless loop. It fails when updating the sequence value and therefore tries again and again and again...
> It cannot update the sequence because postgre sql stores milli and nanoseconds within the timestamp. The WHERE clause from the update omit the milli and nanoseconds. So it tries to update ... WHERE timestamp='2010-06-10 14:22:24'  but in DB it is '2010-06-10 14:22:24.21231'.  The update fails and the loop does never stop. It would be great to be informed somehow if the loop goes beyound some big value.  I did not dig into this deeper, but here is some SQL excerpt:
> CREATE TABLE wb_sequence_generator
> (
>   seqname character varying(40) NOT NULL,
>   seqtime timestamp without time zone NOT NULL,
>   seqvalue bigint NOT NULL,
>   CONSTRAINT wb_sequence_generator_pkey PRIMARY KEY (seqname)
> )
> WITH (
>   OIDS=FALSE
> );
> insert into wb_sequence_generator (seqname, seqtime, seqvalue) values ('thetest', NOW(), 2);
> select * from wb_sequence_generator;
> Output:
> "thetest"  ;  "2010-06-29 09:39:56.360305" ;  2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira