8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-29 06:43:03 +01:00
Commit Graph

398 Commits

Author SHA1 Message Date
dimitr
c16b693999 Added ISC_mutex_fini(), per Claudio's request. Also added ISC_unmap_file().
Moved the consistency switch handling into the proper scope. Fixed the memory allocation.
2009-08-19 17:05:07 +00:00
dimitr
28adc69db6 Fixed CORE-2598: fb_lock_print -c[onsistency] switch doesn't work on Windows. 2009-08-19 09:54:52 +00:00
dimitr
b3843ebca4 Cleanup. New nbackup internals don't need this code anymore. 2009-08-19 08:07:18 +00:00
alexpeshkoff
4fe226c84d Much better fix for CORE-2590, thanks to Dmitry Yemanov 2009-08-19 07:49:37 +00:00
robocop
e71bd1400d Comments. 2009-08-14 07:25:09 +00:00
robocop
022895cbde Style. 2009-08-14 05:51:21 +00:00
dimitr
3f6dd2bceb Easy fix for CORE-2591: High mutex wait ratio and degraded performance after some time of performing normally.
Let's field tests to show us whether we would need a more complex solution in order to utilize the shared memory better.
Also, changed the allocation granularity from 4 to 8 bytes, as our most common locks are equal or longer than 8 bytes now.
2009-08-13 14:35:21 +00:00
robocop
7c01c50390 Style. 2009-08-13 14:23:38 +00:00
asfernandes
8a94ecf6bc Misc 2009-06-29 02:06:00 +00:00
robocop
fc2fcf98da Style. 2009-06-27 07:00:34 +00:00
robocop
f10e1b72eb Style. 2009-06-27 06:23:36 +00:00
robocop
2e3ce0d23d Misc. 2009-06-07 09:49:58 +00:00
robocop
c6106603df Misc. 2009-06-05 10:24:39 +00:00
robocop
51d3c9b756 Let's use more typical #ifdef to test macros instead o #if. 2009-05-29 11:27:41 +00:00
robocop
66b1227b22 Unused params, some formatting, cleanup. 2009-05-01 17:21:36 +00:00
robocop
2d7cb94844 Unused params
Some BLR checks
2009-04-28 13:08:04 +00:00
dimitr
774213d76c Misc. 2009-04-13 08:24:39 +00:00
asfernandes
d136f88092 Misc 2009-04-11 19:41:01 +00:00
robocop
0bf3d11247 Misc. 2009-04-10 14:28:35 +00:00
alexpeshkoff
c4f37d6f9b No sense keeping old value of shared memory pointer when file is already unmapped - thanks to Claudio 2009-04-10 10:35:45 +00:00
alexpeshkoff
ab90217604 Better fix for lock files in CORE-2402 2009-04-08 11:30:15 +00:00
alexpeshkoff
1e7898ea22 Fix for CORE-2402: bad permissions on temp files, /tmp is polluted with a lot of files 2009-04-08 11:00:58 +00:00
alexpeshkoff
77498cac9b Fixed some warnings 2009-04-03 10:49:07 +00:00
robocop
5acf561eb6 Get rid of some typedefs. 2009-04-02 08:53:25 +00:00
alexpeshkoff
cc69cf7c6e Fixed CORE-2354: "fb_lock_print -ia" output is not flushed to a file between iterations 2009-03-10 12:27:48 +00:00
robocop
fab6a3a6cf Get rid of superflous parentheses. 2009-02-28 11:57:40 +00:00
robocop
d766c4231d Simplify the call to ISC_event_wait. 2009-02-28 11:47:11 +00:00
dimitr
8576856193 Fixed CORE-2347: "Deadlock. Page type <N> lock conversion denied" error is reported under a concurrent "connect-work-disconnect" kind of load. 2009-02-27 11:33:27 +00:00
asfernandes
d369e26979 1) Fix posix build
2) Remove some warnings
2009-02-15 14:45:37 +00:00
dimitr
4c9413f8a9 Minor optimizations. 2009-02-11 08:26:55 +00:00
robocop
096d8e78e6 Trying to be more consistent in the detection of headers (HAVE_* macros). 2009-02-08 11:38:00 +00:00
robocop
24e8b3b942 At least to me, this change is a bug fix. 2009-02-03 10:59:58 +00:00
asfernandes
f4fbdffe07 Misc 2009-01-29 17:44:21 +00:00
dimitr
a5cf1d69bf Misc. This change follows the solution in unix.cpp. 2009-01-29 17:18:52 +00:00
dimitr
939f8e9724 If we write the dump into the globally accessible directory, let's have its name suggesting it belongs to the Firebird family :-) 2009-01-29 17:05:53 +00:00
alexpeshkoff
31a437f986 Choose better place for lock_table.dump 2009-01-29 16:54:58 +00:00
alexpeshkoff
9843069833 fixed posix build 2009-01-28 14:13:56 +00:00
dimitr
115780718f Make fb_lock_print compatible with the latest commit. Still requires some polishing. 2009-01-28 13:38:06 +00:00
dimitr
1b3927b026 1) Globally named per-database shmem regions.
2) Slightly reworked monitoring internals.
3) Encapsulated the event manager, many internal changes there.
4) Various cleanup, etc.
2009-01-28 12:27:18 +00:00
robocop
6406e45337 Shut up compiler warnings (unreferenced vars, uninitialized vars, compile-time conditional code, etc.) 2009-01-02 06:36:12 +00:00
robocop
d11c994960 Style. 2008-12-31 05:06:08 +00:00
robocop
3b189eaf71 Misc: unused assignment. 2008-12-30 11:27:44 +00:00
robocop
e9be920cc0 Shut up some compiler warnings (some warnings should be enabled again in autoconfig_msvc.h IMHO because hiding our possible mistakes won't help us). 2008-12-30 10:52:52 +00:00
asfernandes
8fbf0e8e8c Remove trailing spaces (.cpp files) 2008-12-05 01:20:14 +00:00
asfernandes
ff5f8745fb Remove trailing spaces (.h files) 2008-12-05 00:56:15 +00:00
robocop
d39690fbff Style (and let lines grow up to 100 columns). 2008-12-04 09:29:16 +00:00
hvlad
111a770839 Release lock manager's mutex in its destructor 2008-11-27 20:20:38 +00:00
alexpeshkoff
d8ea120ded AIX port - use FB_ prefix for alignment constants 2008-11-05 11:26:23 +00:00
dimitr
1a7abd30d2 Cleanup. 2008-10-24 06:18:26 +00:00
dimitr
73b50d0fe0 Misc. 2008-10-24 04:49:15 +00:00
dimitr
c795c0f0bb It wasn't really necessary to bump the lock table version number the last time. 2008-10-24 04:47:14 +00:00
hvlad
e998ff070f Fixed accidentally brocken POSIX build 2008-10-21 10:37:39 +00:00
dimitr
f18f99ff32 Cleanup. 2008-10-20 11:12:01 +00:00
alexpeshkoff
e79f55708d 1. Cleanup - use Firebird::Semaphore instead of local events, removed code
related with local events from isc_sync.cpp.

2. Cleanup - removed unused parameter 'number of events' from ISC_event_wait()
and two unused parameters from ISC_event_init().

3. Added SYSV-semaphore based implementation of IPC to isc_sync.cpp.
This should fix CORE-2102: Firebird 2.5 does not build on MacOS (Darwin).

4. Fixed use of posic CS without (x)inetd (i.e. fb_inet_server -s).

5. Fixed (to be reviewed by Dmitry) recovery after some process death in lock manager.
2008-10-10 15:58:05 +00:00
alexpeshkoff
796a2e4b23 Fixed CORE-2064: AV when process is closing under high load 2008-09-04 09:58:20 +00:00
alexpeshkoff
97f89cb5b1 Fixed CORE-2062: error remaping lock file in classic server 2008-09-03 12:00:59 +00:00
asfernandes
077f8360a0 Misc 2008-07-31 00:45:43 +00:00
hvlad
c1b161fc2d Fixed bug CORE-2000 : Lock manager reported false deadlocks under high load 2008-07-28 21:21:21 +00:00
roman-simakov
cf37531005 Add missed que changing in LockManager::setOwnerHandle 2008-07-23 16:14:54 +00:00
robocop
a302401357 Misc. 2008-07-09 12:34:43 +00:00
hvlad
6ce4216ba3 Fixed bug CORE-1984 : Lock manager reported false deadlocks if one of deadlock participants waits with permitted timeout 2008-07-09 07:57:50 +00:00
hvlad
40f3722373 Fixed bug CORE-1985 : Lock manager code may create 100% CPU load for some time 2008-07-09 07:52:50 +00:00
robocop
8a77b30645 Cleanup: get rid of useless third param in ISC_unmap_file 2008-06-26 11:23:40 +00:00
asfernandes
7fc608346a Misc 2008-06-21 02:25:39 +00:00
skidder
f3bd98b5d8 In firebird 2.1/2.5 fb_lock_print was corrupting (truncating) lock table if run against non-working engine or when -F option is used. This was a regression from Firebird 2.0 for Unix platforms 2008-06-20 03:52:59 +00:00
dimitr
f1907db32d Fixed a deadlock which could occur during the shared memory region remapping. This bug has been introduced by myself along with the LM rework. 2008-06-12 07:34:50 +00:00
asfernandes
7bb0ae3616 Misc 2008-06-11 01:41:42 +00:00
robocop
7d58d35e15 Misc. 2008-06-10 12:10:03 +00:00
robocop
017d04dbfc Misc. 2008-06-10 10:11:39 +00:00
dimitr
cb2e3f0f61 Misc. 2008-06-10 04:18:50 +00:00
dimitr
19717fa63f Misc. 2008-06-09 09:10:55 +00:00
dimitr
1c885a3679 Worked around the compiler warnings. 2008-06-09 08:11:14 +00:00
alexpeshkoff
5b465f4159 fixed gcc build 2008-06-09 07:58:15 +00:00
asfernandes
26a79e3c6e Misc 2008-06-09 01:34:33 +00:00
dimitr
ec1d5a91b4 1) Encapsulated the lock manager and integrated it into the engine.
2) Replaced "early" (before LM) checkouts with "late" (inside LM) ones.
3) Removed the mutex protection that's no longer necessary.
Note: the new LM contains some future code (currently commented out) which will be enabled and tested after the Alpha release.
2008-06-07 09:08:16 +00:00
dimitr
92fb3f0b7a Misc. 2008-05-21 07:32:39 +00:00
alexpeshkoff
f0cb8afa8b cleanup 2008-04-18 09:44:36 +00:00
roman-simakov
db1c8760c3 Completed HTML format output for fb_lock_print. Added links to que. 2008-04-05 14:55:16 +00:00
roman-simakov
2b408da73a Added HTML format output for fb_lock_print 2008-04-04 14:15:59 +00:00
hvlad
259fafa647 Implement CORE-1819 : More efficient solution for CORE-1300 2008-04-02 23:46:59 +00:00
dimitr
6180c37e8d Extra protection to avoid races at the server shutdown. 2008-03-26 15:01:02 +00:00
dimitr
3d47e0c21e Added thread ID to the owner block (mostly for debugging purposes). 2008-03-25 10:39:29 +00:00
dimitr
9e1d388535 Fixed unexpected crashed in purge_process(). 2008-03-21 07:36:11 +00:00
dimitr
83cebeea26 Fixed server crash during memory remapping. 2008-03-18 11:34:50 +00:00
dimitr
ff090e6a7b Cleanup. 2008-03-12 16:42:51 +00:00
robocop
2912e6a5be Cleanup and misc. 2008-03-10 08:44:07 +00:00
asfernandes
6f91a0f18d Misc 2008-03-05 02:51:42 +00:00
dimitr
0a3826d5e6 Defer the process block cleanup till its death. This is dumber but more robust. It avoids races at LCK_fini() and fixes a rare deadlock there. 2008-03-04 19:07:55 +00:00
alexpeshkoff
ad53e24dc5 cleanup 2008-03-03 14:31:48 +00:00
asfernandes
c979d91901 Misc 2008-02-19 02:34:55 +00:00
dimitr
dc4390981c Sync declaration with definition. 2008-02-14 07:33:50 +00:00
dimitr
b7a575e43f Cleanup. 2008-02-13 16:47:34 +00:00
dimitr
49d23b6d22 Major changes in the lock manager, targeted to allow mixed in-process/cross-process working modes. Namely, they are:
1) Separate process and owner blocks. Multiplex blocking signals via single blocking thread.
2) Enable direct in-process AST delivery.
3) Drop PREVENT_OWNER_STARVATION code as not compatible with the new LM structure.
4) Synchronize LM using its own mutex instead of SCH.
5) Implement wakeup'n'remap code for waiting owners.
6) Add more debugging points for memory remaps.
7) Cleanup and style.
Hopefully, this attempt is more POSIX-friendly than my previous one.
2008-02-11 17:30:23 +00:00
robocop
83dc6bde8f Constness 2008-02-02 17:07:37 +00:00
robocop
dc74571185 Use a native, two dimensional array. 2008-02-02 17:06:24 +00:00
dimitr
44be88ad53 Cleanup. singnal_owner() is able to handle the direct call itself. 2008-01-31 13:39:30 +00:00
dimitr
01df1923ec Misc. 2008-01-30 10:34:28 +00:00
dimitr
95e6b3f5f9 More complete temporary rollback to the old logic. We don't need 64-bit owner IDs at this point. 2008-01-30 10:33:53 +00:00
dimitr
132176a475 Major synchronization changes. Description of the commit will be posted to fb-devel. 2008-01-26 12:52:51 +00:00
alexpeshkoff
39896cb955 Fixed CORE-1671: atexit() calls in client libraries cause segfaults
and CORE-1079: Every attach of fbclient/fbembed library leaks 64KB of memory

To do it:
- created new template GlobalPtr, controlling access to destructors of global objects.
- applied it to global objects.

Also some related cleanup.
2008-01-23 15:52:40 +00:00
dimitr
956da93e27 Cleanup. 2008-01-17 13:40:35 +00:00
dimitr
83a070b17a Misc. 2008-01-17 13:10:28 +00:00
alexpeshkoff
bfdf145879 Fixing merge 2008-01-16 13:07:46 +00:00
dimitr
48e81dd58a The merge is being fixed. 2008-01-16 12:22:11 +00:00
dimitr
1dd06bb484 The merge continued. 2008-01-16 07:40:12 +00:00
paulbeach
7602a29b94 HPUX Port 2007-11-12 14:26:44 +00:00
hvlad
2c76551d48 Correct hash function of lock manager. I don't think that using last four bytes of key is a good hash :) 2007-09-25 20:28:20 +00:00
hvlad
8d6787665c Fix alignment issues 2007-09-07 07:41:07 +00:00
robocop
97dbdef560 Paranoid buffer overrun protection. 2007-09-02 09:52:42 +00:00
asfernandes
ff4145e88d Misc 2007-08-30 02:40:29 +00:00
hvlad
871df7e5c5 Use memcpy instead of byte copying as Adriano suggested 2007-08-29 22:27:31 +00:00
hvlad
b741d97fd5 Make fb_lock_print print lock keys for database pages in page_space:page_number format 2007-08-29 08:33:48 +00:00
dimitr
dd853cc9e8 Fixed an occasional infinite loop in DEV_BUILD. 2007-08-28 08:38:22 +00:00
alexpeshkoff
d34e4014f7 Bacported fix for CORE-1418: Races when starting and quickly shutting down blocking AST thread 2007-08-20 13:28:01 +00:00
alexpeshkoff
1f77b68e2b 1. Fixed AV when fb_lock_mgr exits.
2. Made timeout in LOCK_manager() 10 times smaller - we are not in year 1993.
2007-08-10 08:59:04 +00:00
alexpeshkoff
8f1bad6558 Moved LCK_OWNER constants to lock, where they are actually used, from jrd 2007-08-10 08:29:32 +00:00
asfernandes
613faffafb Misc 2007-08-02 02:00:37 +00:00
robocop
affeac235f Cleanup. 2007-07-29 02:32:41 +00:00
asfernandes
6beb5e28bd Misc 2007-07-26 01:23:18 +00:00
alexpeshkoff
b3031d19c2 Added one more check in DEV_BUILD 2007-07-25 13:26:13 +00:00
skidder
04b9ec818b NBAK synchronization rework. This should fix CORE-1151 and other Nbackup stability issues 2007-04-24 14:05:46 +00:00
alexpeshkoff
38f48eda38 Fixed CORE-107 - instance of fb_lock_manager runs after build 2007-04-11 09:25:21 +00:00
asfernandes
d87a30bf0c Misc 2007-02-23 01:42:10 +00:00
alexpeshkoff
dfef55e991 Fix for CORE-968 - Assertion failure in posix/isc_ipc.cpp 2007-02-22 16:47:39 +00:00
robocop
7274dc89c1 Totally misc. 2007-02-20 08:40:38 +00:00
hvlad
c0989bce8b Fixed CORE-1031 : fb_lock_print.exe fails on windows 2003 R2 / XP SP 2
and CORE-1133 : XNET (IPC) communication protocol does not work across sessions
2007-02-19 13:05:27 +00:00
robocop
409ff041dd Misc and replaced "IB" by "FB" where it made sense to me. 2007-02-11 09:04:54 +00:00
dimitr
ba3d3c2093 A kind of cleanup. 2007-01-25 13:26:32 +00:00
dimitr
70730a1486 Resolved CORE-958. 2007-01-24 19:48:58 +00:00
dimitr
2bc42d7dba Cleanup. 2006-06-02 08:26:08 +00:00
robocop
d0b711f2bc Totally misc. 2006-04-30 06:41:38 +00:00
robocop
351674ec0c Get rid of another uppercase typedef. The name "owner" caused collisions, so "own" was left. Probably lockOwner is better in the long term. 2006-04-29 00:34:06 +00:00
dimitr
e5869b3921 Misc. 2006-04-25 07:37:19 +00:00
robocop
2f88f5765a Misc. 2006-04-08 03:29:17 +00:00
robocop
1f84bac700 Mark unused data members, discover more code associated to conditional compilation, clean some places, replace custom loops by memcpy and memset when possible, etc. 2006-02-23 05:08:26 +00:00
hvlad
73dcebc962 Replace "../jrd/jrd_time.h" with "../common/classes/timestamp.h" 2006-02-03 13:13:27 +00:00
robocop
97122ee389 Replace jrd_time.h by our timestamp.h, but I left timestamp.h's #includes commented where it *seemed* not necessary. 2006-02-03 08:39:36 +00:00
alexpeshkoff
d1ee840d60 fixed gcc warning(s) 2006-01-16 16:49:15 +00:00
alexpeshkoff
7c6f36026f avoid overflows in UCHAR lhb_version 2005-12-18 16:08:49 +00:00
robocop
2814294027 Misc. 2004-12-16 03:03:13 +00:00
robocop
c5d49e867b Misc. 2004-12-08 06:06:51 +00:00
robocop
9be3f77ace 1.- Minimize buffer overrun.
2.- Stack variable should not be referenced once the owning function finishes. Make it static.
2004-12-08 06:03:05 +00:00
robocop
d6535351a2 Misc: style. 2004-11-24 09:22:07 +00:00
robocop
f80199d26d Treat string literals and string constants with more respect. 2004-11-08 03:33:26 +00:00
robocop
5a33aeef91 Misc: extra semicolons do not help. :-) 2004-11-07 10:38:13 +00:00
dimitr
aa51245372 Forgotten commit. 2004-10-13 18:45:10 +00:00
skidder
5dcb60e4ff Use MSVC6 variant of code everywhere to avoid excess conditionals 2004-10-03 20:14:35 +00:00
robocop
3085d78cd5 Little program made more correct. 2004-10-03 07:06:20 +00:00
robocop
d90eee597b MSVC6 doesn't know how to convert UINT64 to double. 2004-10-03 04:44:49 +00:00
skidder
e8d37fc3c4 Small lock manager fixes.
Use 64-bit lock manager performance counters. 32-bit counters overflowed every few hours under load and this was considerably reduced their usefulness.
Use separate version for 64-bit lock manager tables. While you can have both 32-bit and 64-bit versions of engine running on the same machine lock manager structures have different layout and mismatch is not desireable.
2004-10-01 21:29:30 +00:00