Skip to main content

SYS.DataCheck.System

abstract persistent class SYS.DataCheck.System extends %Library.Persistent

SQL Table Name: SYS_DataCheck.System

DataCheck Overview

The DataCheck system provides a mechanism to compare the state of data on two systems and determine whether they are the matched or discrepant. It is assumed that the global states on both systems may be in transition and the system provides a mechansim to recheck discrepant ranges.

One of the two systems must be defined as the destination. All control and output from the system is provided through the destination system. Typically, the destination system is the destination of shadowing or a non-primary mirror member, while the source system is the source of shadowing or another mirror member. See Destination for detail on creating and configuring a DataCheck system.

The system operates in units called queries. The query specifies a database, an initial global reference, a target global reference, and a number of nodes. The query is sent by the destination system to the source system. Both systems calculate an answer by traversing N global nodes starting with the initial global reference, and hashing the keys/value pairs. The destination compares the query answers from both systems and records the results in a set of RangeList objects.

Queries are created automatically on the destination system based on its settings. The destination system has a Workflow object to specify a strategy for checking globals. The Workflow consists of a number of phases to begin a check, recheck discrepancies, etc. The settings that define what globals to check are stored on the Destination in the RunParameters object.

This class, System, is an abstract class containing elements common to both Destination and Source systems.

Property Inventory

Method Inventory

Properties

property MirrorName as %String [ ReadOnly ];
Name of the mirror that this system is checking or null if not mirrorized
Property methods: MirrorNameDisplayToLogical(), MirrorNameGet(), MirrorNameGetStored(), MirrorNameIsValid(), MirrorNameLogicalToDisplay(), MirrorNameLogicalToOdbc(), MirrorNameNormalize()
property Name as SystemName [ Required , ReadOnly ];
Unique name of the system
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize()

Methods

method GetState(Output reason As StateReason) as %String
Returns the current running state of the system. Values are constants, defined for convenience in %syDataCheck.inc
  • "Starting" ($$$StateStarting) - System is in the initial phases of startup
  • "Stopping" ($$$StateStopping) - System is stopping and will not process any more queries but may not be completely stopped
  • "Stopped" ($$$StateStopped) - System is stopped
  • "Connecting" ($$$StateConnecting) - (destination only) System is attempting to establish a connection to the source
  • "Running" ($$$StateRunning) - System is in the normal running state
  • "Waiting" ($$$StateWaiting) - System is waiting for a condition in order to resume the check

    Returns a reason code by reference to describe why the system is in its current state (particularly the Stopping and Stopped states on the destination system). Reason codes are not provided for all states. The reason will be $$$ReasonUnknown if a specific reason is not provided or not available.

    The reason code on the destination of DataCheck can be used to determine whether the system has stopped due to a Workflow stop phase, a user-requested stop or an error. Upon successful return from the Start() method on the destination system, its state will be changed to $$$StateStarting. On any subsequent call to this method, the caller can determine whether the system has reached a workflow stop phase by checking the reason code for $$$StateReasonWorkflowStop. While there is no guarantee that a reason will be provided when the system is stopped in all cases, it is guaranteed that if the system stops due to a workflow stop phase, the reason will be set to $$$StateReasonWorkflowStop.

    See StateReason for possible reason codes.

  • classmethod GetStateBySystem(systemname As SystemName, Output reason As StateReason) as %String [ SQLProc = System_GetStateBySystem ]
    Projected as the stored procedure: System_GetStateBySystem
    Returns current running state of specified system or null on error. Possible state values returned are identical to GetState()

    Indexes

    index (NameIndex on Name) [IdKey, Type = key, Unique];
    Index methods: NameIndexCheck(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint()

    Inherited Members

    Inherited Methods

    Storage

    Storage Model: Storage (SYS.DataCheck.System)

    ^SYS.DataCheck.SystemD(ID)
    =
    %%CLASSNAME
    Debug
    PeerProtocolVersion
    StorageVersion
    MirrorName
    Type

    Subclasses

    FeedbackOpens in a new tab