R
Rob Fitzpatrick
Guest
The clusters of the BI file are arranged logically in a ring, i.e. c0 -> c1 -> c2 -> c3 -> c0. When you open the database there will be at least four clusters in the ring; there will be more if you ran proutil bigrow. BI notes will be written sequentially to c0 until it is full, and then to c1, and so on. When c3, the last cluster in the ring, is filled a decision point is reached: can the space in c0 be reused or do we have to format and insert a new cluster c4 into the ring and write new notes to it? If (a) the next cluster (c0) does not contain BI notes for an active transaction and (b) all buffers modified by notes in c0 have been written to disk and (c) c0 is at least -G seconds old then c0 can be marked as empty and reused. The BI file does not grow. If those conditions are not met then a cluster c4 is inserted in the ring between c3 and c0 and notes are written there. The BI file has grown logically (and perhaps physically) by one cluster. Your question was whether a single active transaction always forces the creation of new clusters. I would answer "not necessarily". If the BI file current contains 20 clusters and the active BI cluster is c5 and your active transaction's begin note was written to c4, we still have 19 clusters' worth of space to write to before we have to decide whether to grow the BI file. If that same transaction is still active once we get back to c3 and fill it then yes, the BI file will grow because we can't reuse c4.
Continue reading...
Continue reading...