Commit graph

200 commits

Author SHA1 Message Date
Sergey Yelin
38643c5fb4 More cleanups 2011-07-18 15:47:57 +04:00
Sergey Yelin
a1291880df Disable stress test for now 2011-07-18 15:37:32 +04:00
Sergey Yelin
08c55326fe Remove DEBUG flag 2011-07-18 12:19:17 +04:00
Sergey Yelin
5f73c3f32e Make this run on Debian/Ubuntu 2011-07-18 11:50:39 +04:00
Sergey Yelin
9673962a87 More cleanups 2011-07-18 11:28:38 +04:00
Sergey Yelin
fa4ef58c02 Add myself 2011-07-18 11:23:55 +04:00
Sergey Yelin
91350213d2 Cleanup 2011-07-18 11:18:43 +04:00
Sergey Yelin
e3e0c7c3ee Add erlang flags 2011-07-18 11:18:29 +04:00
Sergey Yelin
0163145b5b Auto download Berkeley DB from Oralce then needed 2011-07-18 10:59:48 +04:00
Sergey Yelin
a765b45841 Changes 2011-07-17 23:55:48 +04:00
Sergey Yelin
7ab049b119 Bump up BerkeleyDB version to 5.1.25 2011-07-17 23:50:40 +04:00
Jon Meredith
b45cf7c743 The value to binary line in do_put was accidentally duplicated making extra work on a put. 2009-12-05 04:37:33 +08:00
Jon Meredith
25a78e0b8e Moved check_all_databases_closed inside check for G_DB_ENV != NULL, otherwise
fails on LOCK_DATABASE when G_DATABASES_MUTEX is uninitialized.
2009-12-05 04:37:33 +08:00
Phillip Toland
f14f426828 Download the BDB source code on demand. 2009-08-10 12:44:09 -05:00
Phillip Toland
e20a91e082 Updated Jon's email address. 2009-06-23 15:27:37 -05:00
Phillip Toland
a76f20f477 Added a simple readme file. 2009-06-23 15:17:05 -05:00
Phillip Toland
09184b0399 Added license information. 2009-06-23 15:17:05 -05:00
Phillip Toland
37c84d760f Made test closer to what was happening in production. Sometimes fails with BDB Error: assert failure: ../dist/../mp/mp_fget.c/257: "bhp != NULL", also seen it run with CRC errors. 2009-06-23 15:16:59 -05:00
Phillip Toland
1a01292853 Version bump for release 12. 2009-06-23 15:05:29 -05:00
Jon Meredith
663e7f24ec Cleaned up the const != var tests to var != const. 2009-06-23 15:05:21 -05:00
Jon Meredith
0affeb825c Cleaned up driver
- removed the lock checks now we are happy with the mutex
 - replaced 'const == var' tests with 'var == const' to make code consistent.
2009-06-23 15:02:33 -05:00
Jon Meredith
783acf09ba Relaced G_DATABASES rwlock with a mutex. 2009-06-23 15:02:33 -05:00
Jon Meredith
425d8ddf00 Added extra paranoia around G_DATABASES, checking it is valid at lock and unlock. 2009-06-23 15:02:33 -05:00
Jon Meredith
7c9da71b18 The read lock checks for the G_DATABASES rwlock were incorrect. Multiple readers
are possible.  Now the check for exclusive port/thread is only done on writes.

Added an integration test that reproduces conditions seen during the local-storage-ops-
in-coord branch.
2009-06-23 15:02:33 -05:00
Jon Meredith
3d422bec1d Heavily instrumented rwlock code - rwlock seems to be misbehaving.
About to replace with a mutex.wq
2009-06-23 15:02:33 -05:00
Jon Meredith
bfb1620fb8 Improved debug output on driver stop.
Disabled active_dbs counter as coredump went away.
2009-06-23 15:02:33 -05:00
Jon Meredith
2077413b9e Added active counts to dbref and portref to help see what is being corrupted
in the coredump.
2009-06-23 15:02:33 -05:00
Jon Meredith
86f39286b1 Added extra debug/paranoia on bdberl_drv_stop/bdberl_drv_finish while
looking for the coredump on port close discovered on the local storage ops
inside coordinator branch.
2009-06-23 15:02:33 -05:00
Jon Meredith
254e253d81 Added versions of transaction() and update() that take a transaction
timeout.
2009-06-23 15:02:33 -05:00
Jon Meredith
92b7c3a6ef Refactored environment variable checks. All go through common functions
that validate conversion to unsigned int and prints an error message
on stderr if not used (would prefer to use SASL but it's as good as it
gets during driver setup).
2009-06-23 15:02:33 -05:00
Jon Meredith
e295227147 Refactored common receive loops from many functions into recv_val() and recv_ok(). 2009-06-23 15:02:32 -05:00
Jon Meredith
13240670c3 Added bdberl:driver_info() function to get driver parameters. 2009-06-23 15:02:32 -05:00
Jon Meredith
1cc42dae71 Forgot to rename DBGCMDX for non-debug build. 2009-06-23 15:02:32 -05:00
Jon Meredith
a3ae101dfb Cleaned up debugging code. 2009-06-23 15:02:32 -05:00
Jon Meredith
1e3b89e24e Broke stats code out into bdberl_stats.h module.
Had to rename some functions that became non-static.
Added some accessors to module static variables as needed.
2009-06-23 15:02:32 -05:00
Jon Meredith
6fe6651757 Added more comprehensive debug output if built with debug=1.
Made deadlock checker interval configurable.
2009-06-23 15:02:32 -05:00
Jon Meredith
19addac0fe Made size of thread pools configurable from environment variables
BDBERL_NUM_GENERAL_THREADS and BDBERL_NUM_TXN_THREADS.
2009-06-23 15:02:32 -05:00
Jon Meredith
497b9ca70f Forgot to remove a couple of unnecessary work_buffer copies. 2009-06-23 15:02:32 -05:00
Jon Meredith
56c1617f8e Converted truncate to use async_dbref. 2009-06-23 15:02:32 -05:00
Jon Meredith
def6d9376a Changed stats functions to use async_dbref/async_flags to pass parameters
to async functions rather than work buffer.
2009-06-23 15:02:32 -05:00
Jon Meredith
512cec599e In cases where there was more than one pending request and no active requests,
the linked list would be corrupted linking the pending request on the list of
active requests.
2009-06-23 15:02:32 -05:00
Jon Meredith
dc867e363b Incorporated Diz's crc generation/checking patch to bdberl.erl.
Added crc checking before/after BDB accesses in C driver.
Changed get to use malloc DBTs rather than the user supplied buffer
previously.
2009-06-23 15:02:31 -05:00
Jon Meredith
700ac5c562 Removed unused line. 2009-06-23 15:02:31 -05:00
Jon Meredith
30fba1c995 Added stop(). Closes #318. 2009-06-02 13:36:07 -06:00
Jon Meredith
30c7ad75ac Replaced calls to getenv with erl_drv_getenv/G_DB_ENV->get_home. The erlang
docs say not to use getenv in erlang drivers as they are not thread safe.
The places we were using them were very unlikley to have issues, but you never
know.
2009-06-02 13:14:47 -06:00
Dave Smith
ebd06de3da Merge branch 'master' of git.rascal:/var/git/commons/bdberl
Conflicts:
	c_src/bdberl_drv.c
	c_src/buildlib.sh
	src/bdberl.erl
2009-06-02 10:06:36 -06:00
Dave Smith
88608807b4 Enabling diagnostics/debug info in bdberl build 2009-06-02 10:04:04 -06:00
Jon Meredith
58b870d15c Removed decode_rc calls that are now decoded within bdberl_drv.c 2009-06-01 15:52:06 -06:00
Jon Meredith
40393a8e62 Cleaned up driver finish function to make sure resources had been
allocated before they were freed.
2009-06-01 12:14:26 -06:00
Jon Meredith
9361739244 Removed debug statements left in by accident. 2009-05-29 13:49:49 -06:00