Product Documentation

FairCom DB V12 Release Notes

Previous Topic

Next Topic

Rare KDUP_ERR resolved

Adding a key to a transaction-controlled file could fail with a duplicate key error (KDUP_ERR, error code 2) when FairCom Server's NXTMARKS optimization was enabled (which is on by default). This error requires the following specific sequence of events to occur:

  1. Start a transaction. Use an index lookup function such as EQLKEY (or EQLREC if using ISAM level) to read the last key in a leaf node. Use NXTKEY (NXTREC) to read the next key, which is the first key in the successor leaf node. Delete this key and add it with a different offset. Abort the transaction.
  2. Repeat step 1. This time the key add fails with a KDUP_ERR.

The KDUP_ERR can occur for this specific sequence of events without any other intervening accesses to the leaf node. However, if other accesses to the leaf node occur before the new key is added, the error may not occur.

The logic has been modified to eliminate this error.

Workaround: Add COMPATIBILITY NO_NXTMARKS to ctsrvr.cfg and restart FairCom Server.

Affected Versions: V10.0.0 through V11.6 lines prior to November 2018

Affected Components: FairCom Server

TOCIndex