Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbReleaseBatchBuffer

Release the batch buffer.

Declaration

CTDBRET ctdbDECL ctdbReleaseBatchBuffer (CTHANDLE Handle)

Description

ctdbReleaseBatchBuffer() explicitly releases the batch buffer allocated by ctdbSetBatch. Once the batch is terminated, it can be called to release a buffer left in place due to the CTBATCH_KEEPBUFFER mode.

  • Handle [in] the record handle.

Use case

The CTBATCH_KEEPBUFFER mode of ctdbSetBatch can be used to preserve the batch buffer after the batch is finished and reuse it for another batch. ctdbGetBatchBufferSize() can be used to determine if the buffer has gotten too big. If so, ctdbReleaseBatchBuffer() releases the buffer and reallocates it on the next ctdbSetBatch request.

Returns

  • CTDBRET_OK on success
  • CTDBRET_BATCHISACTIVE if the batch is still active
  • CTDBRET_NOTRECORD if the handle passed in is not a record handle

See also

ctdbGetBatchBufferSize(), ctdbSetBatch

TOCIndex