Single-Update Mode

System operations like GUI updates and data imports can corrupt data if they are run while a different user is updating the database. The system enters single-update mode (SUM) when operations that can affect data elsewhere in the system are performed. When STEP enters SUM, only the connection that is in SUM can update the database.

Important: Systems running an Oracle database, use Single-Update Mode (SUM)—documented below. Since SUM can block a system for long periods of time and since SUM is difficult to achieve on systems with a large amount of data, a system can benefit from enabling LFSC. The option to run LFSC while using Oracle is outlined in the Lock-free Schema Change topic. By default, systems running a Cassandra database use 'Lock-free Schema Change' (LFSC) functionality.

A connection can only enter SUM if no other connection in the system is in SUM. If it is not possible for the system to enter SUM, or if a user tries to make changes or update when another connection is in SUM, a warning message displays as shown below.

Additionally, if you log on to the system while it is in SUM, a warning displays.

The warning displays information about which connection is currently running in SUM. While the user who is not in SUM cannot change data, they can still view data.

Note: To allow the importer to enter SUM, when importing a STEPXML file, on root 'STEP-ProductInformation' tag, set the 'SingleUpdateMode' XML attribute to 'Y' as defined in the SingleUpdateMode in STEPXML topic of the Data Exchange documentation. Without this setting, SUM operations are ignored during import.

Operations that Cause SUM

The following operations will cause the system to enter single-update mode (SUM).

SUM Examples

The following examples are not intended to describe all scenarios in which the Single-Update Mode (SUM) is triggered, but do illustrate some actions that SUM may introduce.

Example 1: Add / Remove a Dimension Dependency

If a user adds or removes a dimension dependency at the same time someone else is manipulating data that uses that dimension dependency, there is a risk of introducing inconsistent data in the database for the particular data that is being manipulated.

Note: Only the concurrently manipulated data is at risk.

For example, adding a dimension dependency to an attribute while data for this attribute is simultaneously being imported could result in inconsistent data. One way this might occur is if the importer caches the attribute's dimension dependency but does not record that the new dimension dependency has been applied until a number of seconds have elapsed. In that interim period, the values written for this attribute will have the wrong dimension dependencies.

Example 2: Merge Attributes

If one user is manipulating values on an attribute while a different user is merging that attribute, there is a risk that inconsistent data may be introduced. This applies to all attributes participating in the merge.

Note: Only the concurrently manipulated values are at risk.

One example of how this might occur is if one user is importing values into the primary attribute at the same time another user is merging a different attribute into the same primary attribute. The merge operation might find a value of the secondary attribute to merge into the primary attribute, and at the same time, the other operation might create a new value for the same product for the primary attribute. These two values might be visible in same workspaces / contexts and be in conflict.

Another potential scenario where this could occur is when one user is importing values into an attribute that is about to be deleted by another user's operation. The import succeeds because the secondary attribute was still present as the second user's process was initiated. However, once the merge is complete, the imported values are deleted with the attribute, thus the merge operation is unable to merge the values because the system did not detect the values in time.

Example 3: Changing the Property of an Attribute

This example covers the following four operations:

  1. Change the 'Externally Maintained' flag of an attribute (i.e., store the historic values of an attribute or not)
  2. Change an attribute to or from using LOV validation
  3. Change an attribute to or from being a BLOB (Binary Large OBject). That is, making an attribute free text searchable or by changing its value length past the 100 bytes boundary
  4. Change an attribute to or from being multi-valued

Changing one of these properties at the same time as another user is manipulating values of the attribute might result in inconsistent data.

Note: Only the concurrent manipulated values are at risk.

For example, changing one of these settings of an attribute while at the same time importing data for this attribute could lead to inconsistent data being imported for the attribute. The importer might have cached the original property of the attribute and not recorded the change until after a few seconds. In these few seconds, values written for this attribute will have an incorrect state, and these values will not be remedied by the batch operation since it has already moved past this point in the database table.

Guidance for Preventing SUM Activation

To avoid entering SUM when changing attribute definitions, use the following procedures:

  1. Create a new attribute (Attribute B) with the same desired attribute definition (including the changes from the origin attribute, Attribute A).
  2. Use Bulk Update in the STEP Workbench to copy all attribute values from Attribute A to Attribute B. For more information on using bulk update functionality, refer to the Bulk Updates topic within the Getting Started documentation.
  3. Switch the IDs of Attribute A and Attribute B. To do this, navigate to either attribute on the System Setup tab of the workbench. Right-click on the attribute and select 'Switch Attribute IDs'. In the resulting dialog, select the attribute that the selected attribute should swap IDs with.

If a user attempts the above actions without entering into SUM then errors in data could occur.