dimitr
6199136792
Refactored database monitoring, made its handling attachment bound. This should make deadlocks impossible, as well as avoid blocking worker connections while the monitoring request is processed.
2014-07-31 08:56:53 +00:00
skidder
7c743fc291
Fix build warnings
2014-07-17 18:48:46 +00:00
dimitr
153b06b2fd
Minor structure changes.
2014-06-13 16:28:22 +00:00
alexpeshkoff
6a2016235a
Fixed CORE-4435: After calling release() for attachment to database (instead detach) in embedded mode attachment remains active forever (and some cleanup re. reference counters)
2014-06-10 07:13:34 +00:00
robocop
fa2f26b645
A bit less repetitive code.
2014-04-04 07:51:24 +00:00
robocop
29e36dc4f3
The 0th generator becomes unnamed. Only internal requests can access it (zero length names are not allowed from outside). RDB$GENERATORS is no longer a reserved name.System generators cannot be changed by user requests, but can be queried with gen_id(g, 0) if the permissions (ACL) allow that. We don't track dependencies on sys generators, it's not necessary.
2014-04-04 06:39:09 +00:00
hvlad
5e3c596545
Fixed bug CORE-4309 : 'Cache Writer' record in MON$ATTACHMENTS dissapear when delete other connection that running some 'heavy update' on big table via delete from MON$ATTACHMENTS
2014-01-11 09:10:44 +00:00
asfernandes
2aa3e8dd4d
Working in progress on the fix for CORE-4271: unify as possible the handling of procedures and functions.
2013-12-12 14:42:31 +00:00
alexpeshkoff
bd65abc1aa
Cleanup
2013-10-31 15:10:26 +00:00
dimitr
c235774864
Attempted to fix CORE-4235: Deadlock is possible while accessing the monitoring tables under concurrent load.
...
Refactored the list of reference counted attachments to be useful in other cases.
Some minor adjustments in the monitoring code.
2013-09-22 16:10:06 +00:00
dimitr
c367d1f958
Cleanup and use the explicit rollback via TIP for all kinds of forced disconnections.
2013-09-04 17:46:09 +00:00
dimitr
3c315f584b
Totally misc.
2013-09-04 15:05:00 +00:00
dimitr
01b81b1edb
Code simplification and some corrections.
2013-08-19 18:50:28 +00:00
alexpeshkoff
a8f8465366
Postfix for CORE-3935 & CORE-3944: helps avoid segfaults/deadlocks when shutting down firebird
2013-08-16 12:44:10 +00:00
asfernandes
60d0269c92
Fixed CORE-4119 - Metadata source becomes wrong after twice transliteration to the metadata charset.
2013-06-16 23:05:41 +00:00
alexpeshkoff
c74565ce0e
Avoid races with lck_attachment in AST
2012-12-29 13:48:49 +00:00
dimitr
e29b50f980
Front ported my yesterday's commits to trunk.
2012-12-23 07:10:56 +00:00
alexpeshkoff
c4ae450de4
Re-read attachment from lock after taking lock in attachment handler
2012-12-20 12:18:52 +00:00
alexpeshkoff
c7454a49a5
Work in progress (committed due to SF upgrade). Checked only on SS.
...
1. Frontported fix for CORE-3935 and CORE-3993.
2. Added debugging support for mutexes and rwlocks in Vulcan style.
Unfortunately after last 'svn up' build asserts in JrdStatement:71.
2012-12-14 17:59:02 +00:00
dimitr
657511babe
Wiped out the legacy attachment level counters in favor of the already existing runtime statistics. Introduced a record lock counter (more to follow).
2012-11-01 00:16:55 +00:00
dimitr
9f2a992078
Implemented:
...
CORE-2780: Include client library version and protocol version in mon$attachments
CORE-2187: Return the Hostname in mon$attachments
CORE-3779: Report OS user name in MON$ATTACHMENTS
+ some cleanup.
2012-09-12 07:45:51 +00:00
dimitr
42a4c93b97
1) Removed the no longer actual "parent lock" concept from both the lock and event managers.
...
2) Reworked the lock manager synchronization: added the RAII mutex holders and avoided dirty reads for the shared memory.
3) Encapsulated lck_length into the Lock class + small related refactoring.
4) Front ported recent fixes from the v2.x branches.
5) Misc cleanup.
2012-06-21 15:37:38 +00:00
alexpeshkoff
2a01e4bcf9
Implemented CORE-3861: Make it possible to encrypt database
...
Also some cleanups, the most important are:
- meaningful ctor on Jrd::Lock, helping to avoid code dup
- avoid unneeded h-file dependencies, making boot build engine dependent
2012-05-31 16:53:42 +00:00
robocop
642d506cd9
Change txn numbers to unsigned and commit after Vlad's review. If the compile-time checks (to ensure enough room for the new txn type) are too ugly, they may be deleted.
2012-05-19 12:04:37 +00:00
hvlad
24d152138d
Refactoring of runtime statistics and related classes:
...
- moved relation's counters into RuntimeStatistics.h
- renamed RuntimeStatistics::bumpValue to RuntimeStatistics::bumpRelValue and thread_db::bumpStats to thread_db::bumpRelStats to make things more clear
- removed not obvious cast in VIO_bump_count
- removed dependency of RuntimeStatistics.h from ntrace.h
2012-04-11 09:38:19 +00:00
alexpeshkoff
4e795f4047
Include platform definitions file common.h in firebird.h. Use OS-specific ThreadId instead artificial FB_THREAD_ID, avoiding unneeded casts in the code. This should fix BSD and MAC ports.
2012-03-01 08:55:43 +00:00
dimitr
444d5302e1
Refactored the tdbb initialization, especially in AST and BG threads.
...
Replaced dbb_use_count with a list of active requests (to be utilized later).
Misc cleanup.
2011-10-18 18:02:57 +00:00
dimitr
809fba5ec9
Reworked the garbage collector thread:
...
- a single try-catch block looks better
- cross-helping between GC and CW/CR threads is agreed to be a bad idea
- replaced ATT_disable_gc_notify with a check inside notify_garbage_collector()
- made the logic more straightforward
Careful review would be appreciated.
2011-09-21 07:59:15 +00:00
hvlad
f2aaa12ce5
Improvement CORE-3536 : Garbage collection in GTT is unnecessary delayed by active transactions in another attachments
2011-06-24 12:49:08 +00:00
robocop
5ad96271e6
Misc.
2011-06-24 06:34:16 +00:00
hvlad
99c9c8e2db
Enabled background threads (garbage collector and cache writer).
...
Introduced special kind of system attachments used in this threads and show its activity in monitoring.
2011-05-27 07:57:16 +00:00
hvlad
177b43306c
Adjust order of releasing metadata objects when attachment is released.
...
It also avoids assert in MET_verify_cache() pointed privately by Alex.
2011-05-11 09:39:57 +00:00
asfernandes
d0c2265105
Misc.
2011-05-10 01:12:14 +00:00
hvlad
fef1f49c94
Shared page cache implementation
2011-05-09 10:15:19 +00:00
asfernandes
69dc52ba48
Integrate IAttachment and ITransaction in the external engines API.
2011-05-07 19:52:44 +00:00
alexpeshkoff
256cb1e853
1. Use reference counted stable in global pool objects instead PublicHandle's validation.
...
2. Avoid massive segfaults when closing heavily loaded server.
3. Restored logic in YValve required for correct shutdown.
4. Do not change externally visible request body when preparing it.
2011-04-25 17:47:56 +00:00
alexpeshkoff
437d841cfa
Rolled back my commit using IBlrMessage interface. Replaced with single plain structure FbMessage.
2011-04-13 12:41:40 +00:00
alexpeshkoff
9a4689d3e9
Use interface IBlrMessage instead passing C++ class pointer to API interface's functions
2011-04-08 16:43:05 +00:00
alexpeshkoff
4c3f87d6bd
Continued renaming interfaces. Added comments
2011-04-08 15:18:50 +00:00
alexpeshkoff
5c88e478f6
Use better names for a number of objects according to Vlad's suggestion
2011-04-07 17:16:00 +00:00
asfernandes
166c41c5b1
Move transactRequest, createBlob, openBlob, getSlice, putSlice and ddl from ITransaction to IAttachment.
...
It's better to have one standard than two, and "ddl" was broken from API POV.
So make the IAttachment always the caller, explicit or implicit (via IStatement or IRequest), and pass the ITransaction as parameter.
2011-03-21 21:56:47 +00:00
asfernandes
34fd6866bc
Remove unused message types.
2011-03-20 19:15:13 +00:00
asfernandes
2ce201f4ae
Use MessageBuffer in executeMessage and fetchMessage.
2011-03-20 19:14:03 +00:00
asfernandes
dfe830af7c
Added EVENT_TYPE and OBJECT_TYPE to DDL_TRIGGER context. Improvement suggested by Thomas Steinmaurer.
2011-02-20 01:08:48 +00:00
hvlad
12ada43e38
Front ported improvement CORE-3323 : Ability to cancel waiting in lock manager
...
LM part will be changed to not rely on engine internals.
2011-02-02 11:20:52 +00:00
hvlad
dca44e309d
Make it compiles on Windows after Alex's changes. MSVC10 build will follow later.
2011-01-24 12:51:32 +00:00
alexpeshkoff
d6fcde387b
New plugin manager. Use it for all types of plugins.
2011-01-14 17:31:40 +00:00
asfernandes
9c42d4e5af
Finish the statements refactor in the engine. Get rid of jrd_nod.
2010-12-04 22:15:03 +00:00
alexpeshkoff
0ab6c4abf7
Avoid throwing C++ exceptions from authentication plugins
2010-10-28 08:02:42 +00:00
alexpeshkoff
e05c1a825f
Moved some more .h-files to common from jrd as Vlad suggested
2010-10-13 10:39:52 +00:00
asfernandes
91384eb587
Misc
2010-10-12 17:40:27 +00:00
alexpeshkoff
83d6a2f88c
Restored a lot of changes, rolled back by me unintentionally
2010-10-12 11:36:51 +00:00
alexpeshkoff
2dc25a44bb
OSRI and new posix build
2010-10-12 08:02:57 +00:00
asfernandes
48d83b8fef
Refactor nod_rse, nod_relation, nod_procedure, nod_union, nod_aggregate and nod_window.
2010-08-24 03:25:01 +00:00
asfernandes
20b0bbaf82
Refactor CREATE/ALTER/DROP DOMAIN
2010-07-06 00:49:33 +00:00
asfernandes
f2c938d9fa
Refactor CREATE/DROP COLLATION
2010-06-26 01:52:06 +00:00
asfernandes
4763533669
Refactor jrd_req into JrdStatement (shared part) and jrd_req (execution of a statement).
...
Fixed some bugs found in the way.
2010-04-18 22:19:11 +00:00
alexpeshkoff
88b8a40a04
1. Cleaned up most of SUPERSERVER usage.
...
SUPERSERVER has 4 different meanings in our code:
- this is milticlient server (replaced with Config::getMultiClientServer())
- use shared data cache (replaced with Config::getSharedCache())
- use shared metadata cache (replaced with macro SHARED_METADATA_CACHE)
- database are NOT shared between processes (replaced with getSharedDatabase())
2. Use fb_smp_server as both superclassic and classic binary on posix
(xinetd autodecection is done).
3. Small posix build cleanup.
2010-04-15 14:40:27 +00:00
robocop
b75afaaf9a
Some day we will be able to manipulate objects' data through member functions instead of allowing everyone to change their internals directly.
2010-04-04 09:36:22 +00:00
asfernandes
e1ba33a2ae
Fix problem of the system transaction storing pointer to random or already deallocated attachment. Full build (or kind of) required.
2010-04-02 21:48:15 +00:00
asfernandes
7ff112a901
Some syntactic sugar
2010-01-03 00:19:14 +00:00
asfernandes
fc370c986e
A new way to use PreparedStatement. That one preserves code readability and is very like the preprocessed code.
2009-12-31 17:08:07 +00:00
robocop
06a4224d0b
Put class Attachment in its own files by brute force.
2009-12-25 09:55:05 +00:00