20.12.10

SAP Note 14740 - Synchronization: Overflow in gap management

Symptom:

Symptom 1: Error message in SysLog: overflow in gap management of buffer synchronization. Unexpected return code when gap_insert is called.
Symptom 2: When you access buffered objects on different application hosts, you get different results.

Reason and Prerequisites

Cause for symptom 1: A transaction with a huge number of changing operations on buffered objects is completed with ROLLBACK. At the same time other transactions are running which also perform a huge number of changing operations on buffered objects.
Cause 2: A transaction performing changing operations on buffered objects is only completed with COMMIT after 15 minutes.
Technical background: Each time a buffered object is changed, a synchronization log is stored in the local memory. At Commit time or when the local memory is full, the logs are stored in table DDLOG. The field DDLOG-SEQ_NR is used as a unique identification number of the DDLOG entries.
The unique number is generated at insertion time, however, the newly written DDLOG records only become visible for other application hosts at Commit time. Therefore, the periodically started buffer synchronization needs to remember more than the last number of a synchronization round. It also needs to remember the so-called gaps in the number sequence and it needs to read whether these remain during the next round in the DDLOG. If this is the case, the corresponding synchronization requests need to be executed.
A similar problem occurs, if a transaction that has already written entries to the DDLOG is terminated (ROLLBACK). In this case, the numbers of the rolled back DDLOG records never become visible since numbers that were assigned once, are not reused.
Therefore, you need to use a heuristic in order to handle the gaps.
In the R/3 System, table DDLOG is read each time an application host is started in order to determine possible gaps. These gaps are stored in a management structure in the shared memory (the size of this memory is restricted). Each time a synchronization takes place, the buffer synchronization attempts to process the existing gaps by reading the corresponding DDLOG records. Then, the new synchronization records are read and new gaps are stored. In case the gaps occured due to terminated transactions, there is a time limit for gaps. For gaps which are older than the limit, it is assumed that the corresponding transaction does no longer perform a COMMIT. These gaps are removed from the gap management. The time limit amounts to 15 minutes and cannot be changed via an R/3 parameter.
Since the gap management structure in the shared memory cannot be increased dynamically, an overflow of the gap management is possible in extreme cases.

Solution
Solution for symptom 1: The actual error is that a huge number of change operations on buffered tables take place. You should remove the buffering of these table (SE11 -> Tables -> Technical settings). With the help of program RSDBBUFF the change operations on buffered tables can be traced.
In Release 4.6 as of patch level 1396 all local buffers are reset in case of an overflow of the gap management.
Solution for symptom 2: Correct the corresponding program so that the COMMIT is carried out quicker.

No comments:

Post a Comment