Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Merged branch "DOC0000138" into parent

After loading a .SOP file into a retrieved pack record or after merging several local packs, some VCS records can thrown some errors. For example, the translation records on the target instance are different from the ones in retrieved pack causing data inconsistency, or any other reason., the system checks if VCS records may cause errors. Generally, collisions may appear during the configuration pack import process.

Their leading cause is that the dependent table or record does not exist in the database.

Consider a common use case:

  1. We have exported the Incident table, child for the Task tablea Business Rule record.
  2. We import it to the instance without the Task table.
  3. In this case, the Incident table cannot be created on the target instance, because there is no parent table from which to inherit.
  4. target instance which has the same Business Rule record updated later, that is, this record is newer.
  5. The collision is thrown: the target instance has a newer version of this record.

You After that, you can find the erroneous record at the VCS preview log related list (in the in the VCS Preview Log related list of in the VCS Retrieved Pack section). This record has the Collision state and the appropriate Error Text containing the error cause. Erroneous records cannot be included in the saved records pack (VCS Records) bound to the retrieved pack that is used for data recovery. records. These records store the error cause in the Message field and have the following states:

StateDescription
CollisionRecord in this state requires user's attention and will not be implemented until the collision is solved.
SkippedRecord in this state will be ignored while implementing the pack.
WarningThis state highlights valid records having minor mismatches. Depending on the error, records will be implemented or ignored.

You can solve some collisions by completing the following To resolve a collision, follow these steps:

  1. In the configuration pack you need, scroll down to the Related Lists area and open the VCS Preview Log tab.
  2. Filter out records in the Good state using the Condition Builder.
  3. Open one of recordsa record from the selection.
  4. Read the text in the Error Text field the Message field to find the error cause.
  5. Open the corresponding record in the Retrieved Records related list.
  6. Make necessary changes to the retrieved record in

    the 

    the JSON Copy field.

    Tip

    In some cases, especially when the version records need complex fixes, it is preferable to configure the erroneous records on the source instance and try to implement fixed configuration pack once again.


  7. Click Save or Save and Exit to apply changes.
  8. Return to the configuration pack record and click Prepare changes.
  9. Make sure that the VCS Preview Log record state has changed to Good.
  10. Repeat these steps for every record until all necessary records in the VCS Preview Log are in the Collision state if there are more than one Good state.
  11. When all necessary records in the VCS Preview Log are in the Good state, click Import pack.


Note

Please keep in mind that if any collisions occurred during the local pack preview, the process will be canceled on the first occasion, the others will not be shown.

Collisions disposal methods

The idea in the collision fixing process is to try to dispose of collisions in the highest level tables. This method allows removing collisions in the lower-level tables automatically. It can be done about like this:

  • Filter the records in the VCS Preview Log by the state (state = collision).
  • Analyze errors for the records at the top of the list.
    1. Alternative way: you can filter the list by the Table field. The highest-level tables to analyze are, for example, sys_db_table, sys_number, sys_db_column, and some others.
  • After the error cause was found, it must be fixed on the source instance. The configuration pack is to be exported and previewed again by clicking Preview Again Local Pack.
  • If collisions are gone, then this configuration pack can now be imported. Herewith, all the records from the last configuration pack attached are imported. The retrieved pack status changes to Loaded. The records are added to the VCS Record (sys_vcs_record) table. The last preview log is available in the Related Lists area.
  • After importing, the retrieved pack applying possibility appears. For this, click Apply Local Pack. The system restores records from this configuration pack (in other words, from the VCS Record (sys_vcs_record) table records attached to this retrieved pack). The retrieved pack changes its state to Committed.
  • If a record can potentially cause multiple collisions, the system will display only the first collision. Process the collision and click Prepare changes to see the next collision caused by this record.


    Collisions cases

    If the collisions are not gone, then return to the previous steps.



    Panel

    Collision case 1

    When installing a configuration pack in the system, some record X is added. At the same time, it references to another record Y in this system and in this configuration pack. The Y record that the record X is referenced to does not exist. When the export admin previews the pack by clicking Preview Local Pack, the collision is thrown on this record.After loading the pack, a VCS record has the following Message:

    Reference {sys_id} in {column_name} does not exists in referenced table {reference_table_name}

    Info

    If the reference field has the No Action value in the On Delete field, the record will be implemented without any collisions. See the Reference Fields article to learn more about referencing.

    Collision solving:

    The solution is to add the Y record to this configuration pack on the source instance.



    Panel

    Collision case 2

    The record X is deleted from the system. At the same time, there is a reference to this record in the configuration pack. When the export admin previews After loading the pack by clicking Preview Local Pack, the collision is thrown , a VCS record has the following Message:

    {column_name} column in {reference_table_name} table referenced on this record.;

    Collision solving:

    The solution is to remove change the X record from the configuration packstate to Skipped.


    Panel

    Collision case 3

    Mismatch in the set of fields while importing records between alike tables.

    User case descriptionDetails:

    1. A The User table on the source instance has the N set of fields (see the Source lane in the scheme below).
    2. The same User table with the same name on the target instance has the N-1 set of fields (see the Target lane lacking the manager column).
    3. When the export admin previews the After loading the pack containing records from the table with the N field set, the collision is thrown, and a message that this object is not valid, any actions on it cannot be taken a VCS record has the following Message:

    Column "manager" related to "user" does not exist.

    Collision solving:

    To solve this collision, create or update the object, excluding attributes missing on the target instance. In the above example, the N-fielded table will be successfully imported to the target instance, where the N-1-fielded table is created. But, the fields that exist in the source instance and are not in the target instance will not be created in the target instance. See the schema below.

    • Continue import with the Warning state. In this case, the column will not be created, and the imported records will have the N-1 set of fields.

    OR

    • Import the lacking column into the target instance so that the table with N-1 fields becomes table with N fields. Then reload the initial local pack.

    Image AddedImage Removed


    Panel

    Collision case 4

    The records on the target instance are newer than in a the configuration pack to install. It can be determined by the date and time of record creation.

    Collision solving:

    Export admin needs to initiate a local pack preview

    .

    In the process:

    Collision-causing records will be marked with the Skipped state.

  • When applying the local pack, the records with this state will be skipped. The records that were present on the target instance initially will stay.
  • The Message is the following:

    The system has a newer record

    Collision solving:

    • Change the state to Good. In this case, the target instance records will be updated to those from the configuration pack.

    OR

    • Keep the Skipped state to keep the target instance records without changes
    In the case record in the configuration pack is newer than on the instance, then it will be marked with the Good state, and it will replace the record on the instance
    • .


    Panel

    Collision case 5

    In the configuration pack, a table is to be deleted but contains records (is not empty). If the table being deleted is empty, then there is no collision.Collision

    solving:Collision

    -causing records will be marked with the Skipped state.

  • When applying the local pack, the records with this state will be skipped.
  • If the record was marked with the Good state, then

    The Message is the following:

    Table is not empty

    Collision solving:

    • Change the state to Good. In this case, the table and all records will be deleted.

    OR

    • Keep the Skipped state. The table will stay as it is
    the table will be deleted
    • .


    Panel

    Collision case 6

    A configuration pack contains objects related to the application X. At some moment, export admin tries to apply this configuration pack to the instance that The target instance does not have this application installed. The Message is the following:

    Related application "{application_id}" does not exist. Please repack this pack on the source instance

    Collision solving:

    The solution is to rebuild repack the configuration pack on the source instance in order to add records related to the missing application.



    Panel

    Collision case 7

    Partial attributes mismatch between instances, that is, equal tables have difference in columns.

    User case description:

    A table on the source instance has the N set of fields.

    The

    same table with the same name on the target instance has the N-1 set of fields.
  • The field names on source and target instances are slightly different. See the schema below.
  • and then...?

    Image Removed

    Panel

    Collision case 8

    The collision cause is a unique key violation.

    User case description:

    Details:

    1. The importing configuration pack contains a record X1 from a table with UNIQUE CONSTRAINT.
    2. The target instance contains the same record with different ID, this is record X2. In other words, these two records have identical field values except the ID.
    3. After loading a pack to
    4. It was discovered that the target instance contains incorrect translation record for some element X or does not contain any translation record. This record should be located in the Translations (sys_translation) table.
    5. This translation record for the element X has been created in an appropriate table on the target instance.
    6. On the source instance, a .SOP file has been assembled containing translation for the element similar to element X. The column_id, record_id and language_id fields necessary for UNIQUE CONSTRAINT forming matched up on both instances.
    7. This .SOP file has been uploaded on the source instance. VCS preview logs were generated.
    8. After loading a pack on the target instance, a collision VCS record appeared containing an Error Text more or less the Message like this:"

    This record has a duplication of a unique key. DETAIL: Key (column_id, record_id, language_id)=(156941403909472422, 159170696512371798, 156628684306200767)

    ."

    Collision solvingThe collision solving method is to decide which translation record is more relevant (correct or up-to-date):

    • If Delete the initial X2 record located on the target instance is more relevant, then the collision record can be dropped from the configuration pack and not imported.If the new record is more relevant, then this record should be imported, what will cause initial record overwriteand click Prepare changes.

    OR

    • Skip import of record X1.


    Panel

    Collision case 8

    The column to be inserted exists on some level of inheritance.

    Details:

    1. The target instance has table X and table Y, which extends from table X. That is, table Y is a child to table X, and therefore table Y inherits columns of table X. These columns belong to table X. See the Table Extension article to learn more.
    2. The configuration pack has a VCS record which inserts column A to table Y.
    3. At the same time, parent table X already has the same column A. That is, it the same column exists on a higher level of inheritance.
    4. After loading the pack, the VCS record contains the following Message:

    A record for column A already created in the table X.

    Image Added

    Collision solving:

    The solution is to change the X record state to Skipped.


    Table of Contents
    absoluteUrltrue
    classfixedPosition