Uploaded image for project: 'Empire-DB'
  1. Empire-DB
  2. EMPIREDB-81

endless loop in DBSeqTable#getNextValue()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • empire-db-2.0.6-incubating
    • Core
    • None
    • linux (debian) + postgre sql 8.3 and 8.4

    Description

      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

      Attachments

        Activity

          People

            doebele Rainer Döbele
            eikek Eike Kettner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: