Free tool for MindTheBird participants!

Hello All,

Good news for all MindTheBird participants – Nucleon Software http://www.nucleonsoftware.com offers free license of there “Database Master” software for all participants of MindTheBird.

If you would like to get such license, please send to free at mindthebird.com email with the following information: “FirstName”, “LastName”, E-Mail, optionally Company name, and get free license of DatabaseMaster (they will be sent in 2-3 work days).

We encourage all tools vendor to run similar programs for MindTheBird participants, and, of course, we ask everyone to join MindTheBird! to support Firebird and to get benefits and prizes.

To join MindTheBird! you just need to put one of MindTheBird! banners or presentations (http://www.mindthebird.com/downloadmtb.html) to your web-site or blog, link it to www.mindthebird.com or to www.firebirdsql.org and send us link to this page for verification.

Best regards,
MindTheBird Team

The truth about automated sweep

Several documents, including books, manuals, papers, tutorials, etc. says that Firebird will start the sweep of a database if the difference between OAT (Oldest Active Transaction) and OIT (Oldest Interesting Transaction) reaches the pre-defined value of sweep interval setting. Some docs, like the ones from InterBase 6.0, even states that the automated sweep will start when the difference between the Next Transaction and OIT reaches the sweep interval value.

So, this post intention is to to clarify what is the truth about automated sweep start, in the hope that people/authors around the world correct those documents to stop this confusion.

In a private talk with Vlad Khorsun, one of the core developers of the Firebird project, he confirmed that all the previous assumptions listed above are WRONG! Yep, it is not NT – OAT, and it is not OAT – OIT. The automated sweep will start if the difference between OST (Oldest Snapshot Transaction) and OIT is greater than the sweep interval defined. So, the correct formula is OST – OIT.

This is valid for all Firebird versions up to date. If you know any document or paper with the incorrect info, please notify the author so he can correct it.

Here is the piece of code that proves that:

if (trans->tra_oldest_active > dbb->dbb_oldest_snapshot)
 {
 dbb->dbb_oldest_snapshot = trans->tra_oldest_active;
...
 }

 // If the transaction block is getting out of hand, force a sweep

 if (dbb->dbb_sweep_interval &&
 !(tdbb->getAttachment()->att_flags & ATT_no_cleanup) &&
 (trans->tra_oldest_active - trans->tra_oldest > dbb->dbb_sweep_interval) &&
 oldest_state != tra_limbo)
 {
 // Why nobody checks the result? Changed the function to return nothing.
 start_sweeper(tdbb, dbb);
 }

The code is somewhat confusing, specially for people who is not used to Firebird code so, you must note that in the above code, tra_oldest_active represents the value of OST calculated at transaction start time. dbb_oldest_snapshot is cached value of OST, updated when any transaction starts. This may explain why so many docs are wrong… at a first look, tra_oldest_active may be interpreted as OAT, but it is not!

1 135 136 137 138 139 200