Product Documentation

c-treeACE V11.0 Update Guide

Previous Topic

Next Topic

Automatic c-treeDB Batch Buffer Resize

The ctdbSetBatch() function takes a parameter buffeLen which is the size of the buffer used internally by c-treeDB to handle batch operations.

CTDBRET ctdbDECL ctdbSetBatch(CTHANDLE Handle, CTBATCH_MODE mode, VRLEN targetLen, VRLEN bufferLen)

A value of 0 for this parameter was an indication that the default value size should be used. The default buffer size is calculated as the size of the fixed portion of the record multiplied by 128.

In this release and later, when bufferLen is set to 0, the default buffer size is calculated as described above, and logic is activated to perform automatic buffer resize if the buffer is not large enough to contain one record.

When bufferLen is not 0 and the buffer is not large enough to contain at least one record, the error BTBZ_ERR (429) is returned. In this case, it is possible to activate the logic to automatically resize the buffer by adding the new CTBATCH_AUTORESIZE c-treeDB batch mode to the mode parameter.

TOCIndex