Uploaded image for project: 'mod-copycat'
  1. mod-copycat
  2. MODCPCT-38

Better strategy for retrieving the result status of record import

    XMLWordPrintable

    Details

    • Template:
    • Development Team:
      Thor
    • Affected Institution:
      Cornell, MI State University/Library of Michigan, St. Michael's College, University of Tennessee Martin

      Description

      Existing approach

      For both single record import and overlay, mod-copycat starts by requesting the /change-manager/jobExecutions endpoint to create an import job.

      Once created, the value of property parentJobExecutionId is used to request
      /source-storage/source-records?snapshotId=$parenJobExecutionId

      The code in mod-copycat repeatedly requests /source-storage/source-records endpoint until the response property sourceRecords contains a list with an externalIdsHolder.instanceId property. When received the property is returned to the client as part of the mod-copycat's import response.

      See the following code that implements it: https://github.com/folio-org/mod-copycat/blob/0584ba45744ad28a3659e3dc08a55bac24718611/src/main/java/org/folio/copycat/RecordImporter.java#L196

      Issues

      While this approach works for import (with frequent timeouts), for overlay/update, the sourceRecords array is always empty and the polling code gives up without returning the instanceId to the client.

      Goal

      The task here is to improve the polling for overlay/update or find another, more reliable method for retrieving the result of the import operation.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                charlotte Charlotte Whitt
                Reporter:
                adam Adam Dickmeiss
                Votes:
                0 Vote for this issue
                Watchers:
                15 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    TestRail: Runs

                      TestRail: Cases