Recovering from a Data Distribution Error

Your existing data is redistributed once you apply the change to the distribution map with the ttGridAdmin dbDistribute -apply command. You receive an error if you request a data distribution or a reset while a data distribution is in progress.

See Redistributing Data in a Database.

TimesTen spawns multiple processes to perform data distribution. In addition, the active management instance communicates with the data instances to facilitate data distribution. The active management instance stores metadata to track the progress of each data distribution. Thus, the data distribution could fail if a critical process fails, an instance fails, or communication fails between the active management instance and the data instances.

The following error message displays if the dbDistribute -apply command fails during data distribution:

% ttGridAdmin dbDistribute database1 -apply
Error : Distribution failed, error message lost due to process failure

There are a few failure cases where the active management instance may not know about the success or failure of a data distribution operation and the metadata may be left in an intermediate state. This could occur if the process (in which the dbDistribute -apply was run) dies or is terminated.

Do not re-initiate another dbDistribute -apply command if the data distribution fails or does not complete. Instead, run the dbDistribute -resync command. The dbDistribute -resync command examines the metadata in the active management instance to determine if a dbDistribute -apply operation was in progress but did not complete (neither committing nor rolling back the changes). If so, the dbDistribute -resync command re-synchronizes the metadata in the database with the metadata in the active management instance (if they do not have matching states).

  • If the dbDistribute -resync command succeeds, the re-synchronization may result in committing or rolling back the metadata changes of the previous dbDistribute -apply operation.

  • If the dbDistribute -resync command fails, you can either:

    • Run the dbDistribute -apply command to attempt the same distribution.

    • Run the dbDistribute -reset command to discard all distribution settings that have not yet been applied, then attempt a new data distribution with the dbDistribute -apply command.

The following example shows the output when the dbDistribute -resync command successfully completes the data distribution operation:

% ttGridAdmin dbDistribute -resync
Distribution map updated

The following example shows the output when the dbDistribute -resync command rolls back the data distribution operation:

% ttGridAdmin dbDistribute database1 -resync
Distribution map Rolled Back

The following example shows the output when the dbDistribute -resync command discovers that there is no data distribution in progress.

% ttGridAdmin dbDistribute database1 -resync
No DbDistribute is currently in progress

The following example shows the output when the dbDistribute -resync command discovers that the data distribution is still in progress.

% ttGridAdmin dbDistribute database1 -resync
Distribute is still in progress. Wait for dbDistribute to complete, then call resync

An error displays if the re-synchronization fails. For example, you might attempt to re-synchronize a data distribution when there are no active data instances. In this case, the following error displays:

% ttGridAdmin dbDistribute database1 -resync
Error : Could not connect to data instance to retrieve partition table version

See Set or Modify the Distribution Scheme of a Database (dbDistribute) in Oracle TimesTen In-Memory Database Reference.