Let attachments to not block others when allocation table is read first time
----------------------------------------------------------------------------
Key: CORE-4432
URL: http://tracker.firebirdsql.org/browse/CORE-4432
Project: Firebird Core
Issue Type: Improvement
Components: Engine
Affects Versions: 3.0 Alpha 2, 3.0 Alpha 1, 2.5.2 Update 1, 2.1.5 Update 1,
2.5.2, 2.1.5
Reporter: Vlad Khorsun
The issue:
- every new attachment need to read nbackup allocation table from disk (i.e.
from a delta file)
- while reading, attachment holds SH lock on allocation table, so all readers
share this lock and proceed in parallel
- when some other attachment need to allocate new page in delta file, it
acquires EX lock on alloc table.
This lock request go to common queue AND blocks all next requests for the
same lock despite of they level.
- when new attachments established very often, some of them will be put in
queue after EX lock requests and
will wait until current SH owners finish they work (could be long enough if
they are read whole allocation table)
and until blocked EX owner finish its work (write 2 or 3 pages in allocation
table)
The improvement:
Start to read allocation table not acquiring alloc lock at all and acquire SH
lock only when last page of allocation
table is read.
This is safe because allocation table is appended only and already full pages
are never modified.
So, we can significantly reduce period of time when SH lock must be hold by new
attachments.
--
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
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel