Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

SAPDB_Bool RTEHSS_ApiDll::MirrorData ( RTEHSS_Buffer const &  sourceMapping,
RTEHSS_Buffer const &  targetMapping,
SAPDBErr_MessageList msgList 
)

Create a mirror group for later data split using the mapping information of master and backup server.

Used by master database server to create the mirror group using the DATA-volume mapping information from master and slave. After the mirror is established, it is splitted immediately to allow both sides to work on its DATA-volumes independendly. Since the master has to wait with the next savepoint for this call to complete, it should complete in a reasonable amount of time. During execution of the RTEHSS_DataSplit() call, no data is written to the data volumes neither on master database nor on backup database volumes.

Parameters:
sourceMapping [in] mapping as returned by calls to RTEHSS_GetMapping
targetMapping [in] mapping as returned by calls to RTEHSS_GetMapping
msgList [out] set to error if call failed
Returns:
true if call, false if not (msgList is used to store information).
Used by master database server to create the mirror group using the DATA-volume mapping information from master and slave. After the mirror is established, it is splitted immediately to allow both sides to work on its DATA-volumes independendly. Since the master has to wait with the next savepoint for this call to complete, it should complete in a reasonable amount of time. During execution of the RTEHSS_DataSplit() call, no data is written to the data volumes neither on master database nor on backup database volumes.
Parameters:
sourceMapping [in] mapping as returned by calls to RTEHSS_GetMapping
targetMapping [in] mapping as returned by calls to RTEHSS_GetMapping
errList [out] set to error if call failed
Returns:
true if call, false if not (errList is used to store information).

Definition at line 600 of file RTEHSS_ApiDll.cpp.

References GetLastError(), m_ApiHandle, m_DllNotUsable, m_MirrorDataLoaded, uMirrorData::MirrorData, Perror(), uMirrorData::procAddress, and SAPDB_ToString().

Referenced by RTEHSS_KernelInterface::EstablishMirror().

{
    if ( m_DllNotUsable )
    {
        msgList = SAPDBErr_MessageList( "RTEHSS",
                                        __FILE__,
                                        __LINE__,
                                        RTEERR_HSS_API_DLL_NOT_USABLE,
                                        "RTEHSS_MirrorData" );
        return false;
    }

    static union uMirrorData u;

    if ( !m_MirrorDataLoaded 
      && !(m_MirrorDataLoaded = this->GetProcAddress("RTEHSS_MirrorData", u.procAddress, msgList)) )
    {
        return false;
    }

    if ( !u.MirrorData(m_ApiHandle, &sourceMapping, &targetMapping) )
    {
        RTEHSS_ErrorCode apiResult;

        apiResult = this->GetLastError();

        msgList = SAPDBErr_MessageList( "RTEHSS",
                                        __FILE__,
                                        __LINE__,
                                        RTEERR_HSS_APICALL_FAILED,
                                        "RTEHSS_MirrorData",
                                        SAPDB_ToString((SAPDB_Int4)apiResult),
                                        this->Perror(apiResult) );
        return false;
    }
    return true;
}


Generated by  Doxygen 1.6.0   Back to index