Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-1379

Referential integrity violation when replaying storage

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: Scheduler
    • Labels:
      None
    • Epic Link:
    • Sprint:
      Twitter Aurora Q2'15 Sprint 6, Twitter Aurora Q2'15 Sprint 7
    • Story Points:
      2

      Description

      At startup in the Vagrant environment I observed:

      E0630 20:45:54.427 THREAD1 org.apache.aurora.scheduler.SchedulerLifecycle$9.execute: Caught unchecked exception: org.apache.aurora.scheduler.storage.Storage$StorageExce
      ption: 
      ### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "CONSTRAINT_4BE: PUBLIC.TASKS FOREIGN KEY(SLAVE_ROW_ID) R
      EFERENCES PUBLIC.HOST_ATTRIBUTES(ID) (1)"; SQL statement:
      DELETE FROM host_attributes
          WHERE host = ? [23503-187]
      ### The error may involve defaultParameterMap
      ### The error occurred while setting parameters
      ### SQL: DELETE FROM host_attributes     WHERE host = ?
      ### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "CONSTRAINT_4BE: PUBLIC.TASKS FOREIGN KEY(SLAVE_ROW_ID) REFERENCES PUBLIC.HOST_ATTR
      IBUTES(ID) (1)"; SQL statement:
      DELETE FROM host_attributes
          WHERE host = ? [23503-187]
      org.apache.aurora.scheduler.storage.Storage$StorageException: 
      ### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "CONSTRAINT_4BE: PUBLIC.TASKS FOREIGN KEY(SLAVE_ROW_ID) R
      EFERENCES PUBLIC.HOST_ATTRIBUTES(ID) (1)"; SQL statement:
      DELETE FROM host_attributes
          WHERE host = ? [23503-187]
      ### The error may involve defaultParameterMap
      ### The error occurred while setting parameters
      ### SQL: DELETE FROM host_attributes     WHERE host = ?
      ### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "CONSTRAINT_4BE: PUBLIC.TASKS FOREIGN KEY(SLAVE_ROW_ID) REFERENCES PUBLIC.HOST_ATTR
      IBUTES(ID) (1)"; SQL statement:
      DELETE FROM host_attributes
          WHERE host = ? [23503-187]
              at org.apache.aurora.scheduler.storage.db.DbStorage.write(DbStorage.java:144)
              at org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:101)
              at com.twitter.common.inject.TimedInterceptor.invoke(TimedInterceptor.java:87)
              at org.apache.aurora.scheduler.storage.log.LogStorage.write(LogStorage.java:632)
              at org.apache.aurora.scheduler.storage.log.LogStorage$3.execute(LogStorage.java:316)
              at org.apache.aurora.scheduler.storage.log.LogStorage$3.execute(LogStorage.java:313)
              at org.apache.aurora.scheduler.storage.log.LogStorage.replay(LogStorage.java:525)
              at org.apache.aurora.scheduler.storage.log.LogStorage.access$1200(LogStorage.java:116)
              at org.apache.aurora.scheduler.storage.log.LogStorage$21$1.execute(LogStorage.java:503)
              at org.apache.aurora.scheduler.storage.log.LogStorage$21$1.execute(LogStorage.java:500)
              at org.apache.aurora.scheduler.storage.log.StreamManagerImpl.readFromBeginning(StreamManagerImpl.java:127)
              at org.apache.aurora.scheduler.storage.log.LogStorage$21.execute(LogStorage.java:500)
              at org.apache.aurora.scheduler.storage.Storage$MutateWork$NoResult.apply(Storage.java:131)
              at org.apache.aurora.scheduler.storage.db.DbStorage.bulkLoad(DbStorage.java:165)
              at com.twitter.common.inject.TimedInterceptor.invoke(TimedInterceptor.java:87)
              at org.apache.aurora.scheduler.storage.log.LogStorage.recover(LogStorage.java:496)
              at com.twitter.common.inject.TimedInterceptor.invoke(TimedInterceptor.java:87)
              at org.apache.aurora.scheduler.storage.log.LogStorage$20.execute(LogStorage.java:477)
              at org.apache.aurora.scheduler.storage.Storage$MutateWork$NoResult.apply(Storage.java:131)
              at org.apache.aurora.scheduler.storage.Storage$MutateWork$NoResult$Quiet.apply(Storage.java:148)
              at org.apache.aurora.scheduler.storage.db.DbStorage.write(DbStorage.java:142)
              at org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:101)
              at com.twitter.common.inject.TimedInterceptor.invoke(TimedInterceptor.java:87)
              at org.apache.aurora.scheduler.storage.log.LogStorage.write(LogStorage.java:632)
              at org.apache.aurora.scheduler.storage.log.LogStorage.start(LogStorage.java:471)
              at org.apache.aurora.scheduler.storage.CallOrderEnforcingStorage.start(CallOrderEnforcingStorage.java:92)
              at org.apache.aurora.scheduler.SchedulerLifecycle$6.execute(SchedulerLifecycle.java:252)
      

        Attachments

          Activity

            People

            • Assignee:
              wfarner Bill Farner
              Reporter:
              kevints Kevin Sweeney
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: