Menu

#1445 create table fails with exists error, but table does not exist

version 2.4.x
closed-remind
1
2019-06-04
2016-08-03
No

We are using HSQLDB in an in-process (Tomcat/WebSphere) multi-thread situation where tables are being created, populated, queried and dropped very rapidly -- usually less than 5s in total. Each table is named uniquely, guaranteed. Each table also has a single compound index applied, and each table has a primary key auto generated via identity.

Infrequently, the create table fails with an "object already exists" error. In the catch block of that create, executing the identical create table script succeeds, in all cases.

In a sample run of 900 table creations (being generated by 10 threads in the pool), this occurred only 3 times. However, we can find no programmatic reason for it to occur at all.

Discussion

  • Fred Toussi

    Fred Toussi - 2016-08-05

    Please provide a list of table names used. Is the name of a dropped table ever reused?

     
    • Scott Neufeld

      Scott Neufeld - 2016-08-05

      Datatablexxxx, where x is 0-9999, and then recycles to 0. It fails several
      times prior to 1000, so there's no reuse. Logs do not indicate a problem in
      the multithreading where the same xxxx is used twice by different threads,
      and the catch block that executes directly after the exists exception is
      uniformly successful in creating the same-named table. The error frequency
      does seem to increase if the thread job time decreases, but that's
      anecdotal.

       

      Last edit: Fred Toussi 2017-03-11
    • Scott Neufeld

      Scott Neufeld - 2016-11-29

      Was this reproducible elsewhere?

       
  • Fred Toussi

    Fred Toussi - 2016-12-05

    We have not been able to reproduce this. Any test code could help.

     
  • Fred Toussi

    Fred Toussi - 2017-03-11
    • status: open --> closed-remind
    • assigned_to: Fred Toussi
    • Group: current-release --> version 2.3.5 - 2.4.0
    • Priority: 5 --> 1
     
  • Fred Toussi

    Fred Toussi - 2017-03-11

    Auto name generation has been made atomic to avoid any repeat names.

     

Log in to post a comment.