Subject Re: [firebird-support] Firebird server 1.03 Hangs on client disconnect
Author Daniel Rail
Hi,

At June 25, 2003, 06:24, Jason Berry wrote:

> My questions are:

> 1) What could cause the server lockup described earlier?

The thread scheduler in FB 1.0x wasn't the best and needed some work
for it to work better. Now, in FB 1.5, it has been improved and one
user connection will have a hard time to hang another connection,
since the threads are better handled.

> 2)Will a sweep ever run. I suspect not?

What makes you think it is not run? The sweep interval relates to the
number of transactions, not records. And, that interval has to be
bigger than the difference between OIT and OAT. So, yes the sweep is
not run if the OIT and OAT is always close together and your sweep
interval is always greater.

> 3) Without a sweep running will the deleted records space be reused by new
> inserts?

If the OIT is able to advance past the transaction corresponding to
the delete, then yes it will. The sweep doesn't have to run for the
garbage collection to run. Garbage collection occurs when the OIT
advances. So, in your case, if the OIT advances past the transaction
that deletes the records, then those records are deleted from the
physical file, and the corresponding space in the pages is emptied.

> 4) If the deleted record space is used what would a manual sweep do for the
> database?

Here's the definition of the sweep, as found on IB Phoenix:
"A sweep does the following tasks:
- Brings forward the oldest interesting transaction (OIT) as much as possible.
If there is exclusive access the OIT number will be one less than the Next
Transaction number.
- Touches every record in every table in the database that is accessible to the
transaction that is being used. This is similar to how a SELECT touches a
record, triggering the garbage collection mechanism."

> 5) When will 1.5 be realised fully.

Sorry I don't have the answer, but I'm using FB 1.5 RC3 in production.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)