Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

DIAGNOSTICS FILE_CLOSE_FLUSH

DIAGNOSTICS FILE_CLOSE_FLUSH

Calls by a client to open or close files or connect to c-tree Server sometimes took an unexpectedly long time. This could happen when a file that had many updated data or index cache pages was being physically closed. It was caused by flushing updated data/index cache pages to disk when closing a file. The flushing occurred while the thread was holding a global mutex that was acquired during the file open and close operations. The logic has been modified to prevent this delay.

Note that even though this change avoids a system-wide delay, the physical close of a file still requires its updated cache pages to be flushed. A call to close a file that ends up physically closing the file will not return until the writes to the file have completed. If the file has a lot of updated data or index cache pages, this could potentially take a noticeable amount of time. The use of the background flush options (NONTRAN_DATA_FLUSH_SEC, NONTRAN_INDEX_FLUSH_SEC, TRAN_DATA_FLUSH_SEC, TRAN_INDEX_FLUSH_SEC) can help reduce this delay by flushing updates in the background before the last connection closes a file.

Configuration Options:

The configuration option FILE_CLOSE_FLUSH can be specified in ctsrvr.cfg or changed at runtime in order to enable or disable this feature. FILE_CLOSE_FLUSH YES enables the feature and FILE_CLOSE_FLUSH NO disables the feature.

The configuration option DIAGNOSTICS FILE_CLOSE_FLUSH can be specified in ctsrvr.cfg or changed at runtime to enable diagnostic logging to CTSTATUS.FCS messages indicating the start and end of the file close flush. Sample messages:

- User# 00033 Begin pre file close flush for file mark.dat

- User# 00033 End pre file close flush for file mark.dat; flushes= 3199

- User# 00033 Begin pre file close flush for file mark.idx

- User# 00033 End pre file close flush for file mark.idx; flushes= 2973

Affected Components: c-tree Server

TOCIndex