Dmitry,
What should I do with the code described below?
I do not currently have resources to QA it properly, and the changes will likely break something. To
ensure 100% code coverage with tests is probably a month of work for me personally, which I do not
have now as I have tasks with higher priority.
Tasking Red Soft team to perform serious QA effort on this code with high priority is also
difficult, because Red Database 2.5 has another (much simpler, working and tested) version of
cursors stability code.
I may commit this code to Firebird 3 and then react to possible bug reports (please CC to my GMail
account), as issues with this code will be high priority for me. Or I can delay commit until I have
time to perform 100% code coverage analysis.
Please advise.
Thank you,
Nikolay
On 10/10/2014 04:36 PM, Nikolay Samofatov wrote:
Hello, All!
I have mostly completed my work for statement-level read consistency in READ
COMMITTED mode and
implementation of intermediate versions GC as suggested by Jim Starkey.
Please have a look at the patch against current Firebird 3:
https://drive.google.com/open?id=0B9tc80DCcxtrNWtpSnBDNUdKcGc&authuser=0
The patch includes the following changes:
1. Read Committed transactions have statement-level read consistency semantics
by default
2. New atomics code, uses libatomic_ops for all platforms
3. Shared database counters moved to shared memory
4. TIP cache (TPC) moved to shared memory and is implemented using lock-free
algorithms
5. Snapshot (isc_tpc_concurrency) mode transactions now use shared TIP cache and not a private
copy of TIP bitmap
6. Lock manager data is now ULONG (to allow 2^32-1 transactions)
7. Intermediate versions GC, performed:
- when unneeded version is read by VIO_chase_record_version
- by GC and sweep threads (special logic)
- during index creation (prevents false duplicates)
- during record updates (in prepare_update)
8. Removed some code for precommitted transactions (was thread-unsafe)
9. Fixed errors in ATT_no_cleanup mode
10. Changed handling of records changed by transactions in limbo when reading
them in
no_rec_version transactions with statement-level read-consistency disabled.
It is possible to split some of the changes into smaller patches, but most of the changes depend
on each other.
Criticism and suggestions are more than welcome at this stage. The code passes some basic testing,
but I plan to test it more.
If you like it, and ask me for it, I might actually commit it to HEAD so that it is not only me
who tests it.
Nikolay Samofatov
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel