Uploaded image for project: 'mod-source-record-storage'
  1. mod-source-record-storage
  2. MODSOURCE-160

POST /source-storage/snapshots returns 500 after second enabling for tenant

    XMLWordPrintable

Details

    • Folijet Sprint 91, Folijet Sprint 92
    • 2
    • Folijet
    • Q2 2020

    Description

      Steps to Reproduce:
      1. Enable SRS v4.0.0 on existing tenant by sending a POST request to the /_/proxy/tenants/test_oaipmh/install

      [
          {
              "id": "mod-source-record-storage-4.0.0",
              "action": "enable"
          }
      ]
      

      2. Disable the module from the previous tenant by sending a POST request to the /_/proxy/tenants/test_oaipmh/install with body

      [
          {
              "id": "mod-source-record-storage-4.0.0",
              "action": "disable"
          }
      ]
      

      3. Enable the module back to the previous tenant, as described in the first step
      4. Make a call to the endpoint POST /source-storage/snapshots

      {
        "jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bc9",
        "status": "PARSING_IN_PROGRESS"
      }
      
      

      Expected Results:
      The endpoint returns a response 201 with a created snapshot in the body.

      Actual Results:
      The endpoint returns a response 500, and there is an exception in the container log

      11:21:20.306 [vert.x-eventloop-thread-0] ERROR ExceptionHelper      [849939eqId] relation "snapshots_lb" does not exist
      io.vertx.pgclient.PgException: relation "snapshots_lb" does not exist
              at io.vertx.pgclient.impl.codec.ErrorResponse.toException(ErrorResponse.java:29) ~[mod-source-record-storage-server-fat.jar:?]
              at io.vertx.pgclient.impl.codec.PrepareStatementCommandCodec.handleErrorResponse(PrepareStatementCommandCodec.java:70) [mod-source-record-storage-server-fat.jar:?]
              at io.vertx.pgclient.impl.codec.PgDecoder.decodeError(PgDecoder.java:233) ~[mod-source-record-storage-server-fat.jar:?]
              at io.vertx.pgclient.impl.codec.PgDecoder.decodeMessage(PgDecoder.java:122) [mod-source-record-storage-server-fat.jar:?]
              at io.vertx.pgclient.impl.codec.PgDecoder.channelRead(PgDecoder.java:102) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [mod-source-record-storage-server-fat.jar:?]
              at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [mod-source-record-storage-server-fat.jar:?]
              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
      
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                ruslan_lavrov Ruslan Lavrov
                ruslan_lavrov Ruslan Lavrov
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases