Automatic sweep could be run when there is no need for it
---------------------------------------------------------
Key: CORE-4100
URL: http://tracker.firebirdsql.org/browse/CORE-4100
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 2.5.2 Update 1, 2.1.5 Update 1, 2.5.2, 2.1.5, 2.0.7,
2.5.1, 2.1.4, 2.5.0, 2.0.6, 3.0 Initial, 2.1.3, 2.1.2, 2.0.5, 2.1.1, 2.1.0
Reporter: Vlad Khorsun
When sweep succesfully finished its work it advance OIT up to the value of OST
that was recorded at sweep start time.
If while sweep running there was started more than sweep_interval transaction,
it could be that new OIT value again more than sweep_interval less than new OST
value.
But new OIT is not pointed to the rolled back transaction and in fact it is
recalculated by the first transaction which is started after sweep advances OIT.
The bug is that transaction_start used OIT value from header page when
calculates sweep gap while it is more correct to use just recalculated value of
OIT.
Example:
1. tx 1000 was rolled back. Next tx calculated OIT as 1000 and it is stuck
value.
2. tx 21001 calculated following numbers:
OIT = 1000, OST = 21000, Next = 21001
3. auto sweep is started. Save_OST = 21000
4. while sweep is running there are new 30000 tx started and committed
5. sweep is done with gc and about to advance OIT
OIT = 1000, OST = 51000, Next = 51001
6. sweep advanced OIT up to the Save_OST, i.e. 21000
7. new tx is started and obtained following numbers:
tra_oldest = 21000
tra_oldest_active = 51002
tra_number = 51002
also it is recalculated new oldest tx number and it is 51001
8. condition below is true
tra_oldest_active - tra_oldest > sweep_interval
therefore sweep is started again
9. when sweep is started database header page will contain OIT = 51001
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel