IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Multithreading causes primary key violation

    Posted 06/12/04 12:23 AM

    Originally posted by: SystemAdmin


    I have a multi-threaded map (Max Concurrent Map Instance 0, mercator.ini MaxThreads=20) that uses a DBQUERY to insert a record into an Oracle database table.

    It is triggered by an MQ message arriving on a queue, and checks for the presence of a set of records in a source table. If the records are all present the map inserts them into the destination table. They are then deleted from the source table.

    As the map is multi-threaded, a second instance of the map can sometimes be triggerred before the source records are deleted. This second instance tries to insert the same records, causing a primary key violation.

    I have created a separate single-threaded (Max Concurrent Map Instance 1) submap that is a called using RUN to (1) check for the presence of the records in the destination table, (2) do the insert. This does not solve the problem. It seems like the secondary map is not truly single-threaded.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: Multithreading causes primary key violation

    Posted 06/14/04 01:41 AM

    Originally posted by: SystemAdmin


    The max concurrent maps applies to the map being run by the msl not maps that are run from that map. You need to set the max concurrent maps on the .msl map. that is receiving the triggers.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Multithreading causes primary key violation

    Posted 06/14/04 04:31 AM

    Originally posted by: SystemAdmin


    How important is it that you have a multi-threaded process?
    Mercator is not going to 'touch' those input records until the map completes successfully, so when your second map runs while the first map is still running, it does not know anything about the first map running. Only upon the completion of the first map, does the rows for the second map become a violation.
    This would be a good case where multi-threading might not be the best scenerio. If you single thread the process, then you guarantee that this would not happen.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender