Ledger file management

Ledger file management

book

Article ID: KB0092110

calendar_today

Updated On:

Products Versions
TIBCO Rendezvous -
Not Applicable -

Description

Resolution:
The actual size of the ledger file is not directly related to the number of unconfirmed messages that may or may not be in the ledger file.  The size of the ledger file and how it is managed is dependent on the operating system call "ftruncate()".

On UNIX, this is done by using the system call "ftruncate()" (or an equivalent function on other operating systems, e.g. SetEndOfFile on Windows). The operating system will or will not carry out the operation depending on a number of factors that are beyond the control of TIBCO Rendezvous.

In general, "ftruncate" needs to be provided with a "length" parameter. If a picture of the ledger file is:

abcdef_____klmn_op______z

(where "_" denotes available storage units.) Then, our use of "ftruncate" will not yield any result because "z" is at the end of the file and the "length" parameter we use is equal to the actual size of the file.  Therefore, the file will not shrink in size.

If a picture of the ledger file is:

abcdef_____klmn_op______

Then, we pass the length of "abcdef_____klmn_op" to "ftruncate" and there is a chance that the OS will actually cause the ledger file to shrink.

Therefore, if there is always a record "z" at the end of a ledger file, such a ledger file will never shrink, even though many storage units that have been allocated to the ledger file may actually be free of data.

If you require further information on ftruncate(), please consult the UNIX man pages.

Environment

Product: TIBCO Rendezvous Version: 6.x.x, 7.x.x OS: UNIX Unspecified --------------------

Issue/Introduction

Ledger file management