mco_disk_reset_connection_cache

Commit the connection cache (reset) to the database.

Prototype

    MCO_RET mco_disk_reset_connection_cache(    /*IN*/ mco_db_h db );

Arguments

Description

This function commits the connection cache (resets) to the database. The two functions mco_disk_reset_connection_cache() and mco disk enable connection cache() address a scenario with many connections and long-lasting transactions. In this scenario, the connection cache could cause the page pool to run out of free pages (a new transaction allocates its own connection cache, but long transactions prevent those pages to be release back to the shared page pool). In this case, the connection cache could be turned off or reset often. Under normal circumstances, the application does not need to control the connection cache.

Return Codes

Example

    const char * dbname = "SimpleDb";

    int main(int argc, char* argv[])
    {
        mco_db_h db;
        MCO_RET rc;
        mco_device_t       dev[4];
        mco_db_params_t    db_params;

        ...
        rc = mco_db_open_dev( dbname, simple_get_dictionary(), dev, 4, &db_params );

        if ( MCO_S_OK != rc )
        {
            rc = mco_db_connect(  dbname, &db );
            ...
            rc = mco_disk_reset_connection_cache( db );

            ...
        }
    }

Files

Header file:
mco.h
Source file:
mcodisk.c
Library:
libmcovtdsk.a
Header file:
mco.h
Source file:
mcovtmem.c
Library:
libmcovtmem.a