Icon View Incident Report

Serious Serious
Reported By: Yusuf Zorlu
Reported On: 3/19/2019
For: Version 2.31 Build 2
# 4741 Editing Rows Interactively in Grids with Active Triggers that Execute SQL Can Cause Corruption

Sometimes we get errors like this:

ElevateDB Error #601 The table POSITIONEN is corrupt (The index A_ENTDATE is misisng a required key)

It happens after we copy a dataset + empty some fields. But I don't see any problem in our code After this exception occurs we have to repair the table otherwise the current record cannot be edited.


Comments Comments
It took a couple of months to find the cause of this one, but Yusuf finally was able to put together something that reproduced the issue. The issue was this:

The issue was this:

A) When a Edit/Post took place in the grid in the application, the triggers would execute and issue status updates to the client (see below).

B) The status updates in the application would call Application.ProcessMessages, which would allow keystrokes to get processed.

C) The keystroke processing would cause the grid to navigate and Post the current edit *again*.

D) The EDB Server would allow this re-entrant call, and boom, things are all messed up.

The part that we were missing was the triggers. All of the testing done here did not involve triggers, so we couldn't figure out how a re-entrant server call would get past the required locks. It was able to do so because every lock that was held was held by the same session/thread.

What we ended up doing was two-fold:

1) The triggers were issuing status/progress updates to the client in cases that they shouldn't have. This was a bug, and has been fixed.

2) The EDB Server was allowing invalid server calls to take place in the middle of status/progress updates (from number 1 above). This was originally allowed to prevent deadlocks during pings and other non-essential server calls during status/progress updates, but it also allowed Post operations to sneak in while a Post was already taking place, due to number 1 above. This was also a bug, and has been fixed.

Because of 2 above, you *will* see error #1103 "Invalid request" error messages now whenever this situation occurs again (this is less likely because of 1 above, but could happen if you have a SET STATUS MESSAGE TO, SET PROGRESS TO, etc. in your trigger body). These error messages are basically harmless, and just indicate that an attempt was made to issue an invalid request to the EDB Server from within a status/progress update.


Resolution Resolution
Fixed Problem on 5/10/2019 in version 2.31 build 3


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image