Commit graph

130 commits

Author SHA1 Message Date
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
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
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
1409096860 Renamed get_lg_dir() to get_lg_dir_info and added get_data_dirs_info().
Both new calls return the filesystem id and the number of mbytes available
on that filesystem.
2009-05-29 12:13:19 -06:00
Jon Meredith
2c6277bdf4 Added unknown db type for opening existing databases. 2009-05-29 07:42:18 -06:00
Jon Meredith
553ed4eda1 Enhanced error reporting to return atoms for libc errno, common bdb errors and bdberl errors. 2009-05-29 07:26:59 -06:00
Jon Meredith
c74beeba9f Added transaction stats. 2009-05-28 12:05:52 -06:00
Jon Meredith
e4757031a2 Added mutex stats. 2009-05-27 16:49:18 -06:00
Jon Meredith
e80dc97d6d Added memory pool statistics. 2009-05-27 16:31:26 -06:00
Jon Meredith
62d4522580 Added log stats 2009-05-27 15:25:50 -06:00
Jon Meredith
70dd9ee11a Added lock_stat/1 and lock_stat_print/1 functions to get lock stats. 2009-05-27 15:02:58 -06:00
Jon Meredith
05c1754e7f Added stat/2 and stat_print/1, stat_print/2 functions for retrieving/displaying stats about the BDB subsystem. 2009-05-27 14:03:11 -06:00
Dave Smith
66e1b409ec Make txn begin async relative to VM 2009-05-27 11:21:35 -06:00
Jon Meredith
e2032bb474 Change to bdb build flags requested by Mariella. Remove --enable-o_direct, added
--disable-replicationw
2009-05-22 14:03:34 -06:00
Dave Smith
e3e0b99494 Adding support for BDBERL_SYSTEM_MEM which sets DB_SYSTEM_MEM flag on environment open; add support for changing default page size via BDBERL_PAGE_SIZE. Must be a power of 2. 2009-05-04 13:39:35 -06:00
Dave Smith
2d2fd94769 Remove unnecessary mkdir in buildlib.sh 2009-04-24 09:41:40 -06:00
Dave Smith
42abfa33e7 Another stupid printf removed. 2009-04-24 09:33:44 -06:00
Dave Smith
41f7213235 Rework trickle/checkpoint to use same thread and avoid tromping on each other; add SNMP reporting to the logger 2009-04-24 09:33:01 -06:00
Dave Smith
da7fee83c9 Disable patching for BDB by default; keeping actual patch around in case we want to test with it. 2009-04-24 09:29:20 -06:00
Dave Smith
83d278b0dd Remove sloppy printf (my own stupid fault) 2009-04-23 10:21:03 -06:00
Dave Smith
ce393ba7b2 Adding patch for getting O_DIRECT to work on linux; also enabling in build of BDB 2009-04-22 14:42:58 -06:00
Dave Smith
22f33e0b0d Adding support for registering a logger port/pid to capture BDB messages 2009-04-16 07:08:22 -06:00
Dave Smith
3c84d5dd44 Add configuration flags for trickle time/percentage 2009-03-02 13:33:03 -07:00
Phillip Toland
ab1e627089 Rename tune_system to get_info and remove set calls. 2009-02-16 16:57:48 -06:00
Jon Meredith
552f2ac89a Made sure all erlang binary signed/unsigned integers match up with C data types
through the control function.
2009-02-12 13:20:14 -07:00
Jon Meredith
d3dba23aed Moved zero-ing of async_pool/job inside mutex to avoid risk of race
in bdberl_drv_stop.
2009-02-12 11:19:51 -07:00
Jon Meredith
62e8fa569c Changed driver shutdown to clear util thread active flags before signalling them.
Added debug messages on util thread error.
2009-02-11 11:58:39 -07:00
Jon Meredith
09081f000b Changed the utility thread sleep function to use a custom sleep based on pipe/select
so they can be terminated quickly when the driver shuts down.
2009-02-11 11:22:44 -07:00
Jon Meredith
5ccd73c2ea Added some pedantic defaults to make super-duper-extra-special sure things are as we expect. 2009-02-10 15:24:04 -07:00
Jon Meredith
c8699679c3 Added protection for growing past too many entries to the hash going off the end of the primes list. 2009-02-10 15:22:02 -07:00
Jon Meredith
153d4615cd Merge branch 'master' of ecommons@wax.hive:bdberl 2009-02-10 13:11:35 -07:00
Jon Meredith
f6e84539d4 Added return value check to db_env_create.
Fixed uninitizialized variable error with fn pointer.
2009-02-10 08:59:16 -07:00
Jon Meredith
d833ca708c Changed bdberl_tpool_run to set a pointer to the job structure
rather than return it.  There was an issue where the async thread cleanup
code finished before bdberl_tpool_run returned and wrote the address
of a freed TPoolJob structure into the ErlDrvPort.
2009-02-09 15:01:25 -07:00
Phillip Toland
f1342dc2bd Added variant of truncate that truncates all open databases. 2009-02-03 10:57:50 -06:00
Phillip Toland
1c11f81416 Refactored to eliminate some code duplication. 2009-02-03 09:37:08 -06:00
Phillip Toland
ed24fd72e4 Removed some unnecessary debugging statements. 2009-02-03 09:14:11 -06:00
Phillip Toland
1d7f86ed74 Added \r to the end of debug output so that things line up in the Erlang console properly. 2009-02-03 09:13:48 -06:00
Phillip Toland
df6222a51c Added truncate command. 2009-02-02 15:51:47 -06:00
Phillip Toland
4ba6a03aec Change the way timing is handled for the checkpointer
to avoid problems on shutdown.
2009-01-30 12:42:58 -06:00
Phillip Toland
6bbb503da1 Remove old log files after a checkpoint. 2009-01-29 11:54:33 -06:00
Phillip Toland
75afb8502a Add background checkpoint thread. 2009-01-29 11:27:37 -06:00
Dave Smith
45606ddf56 Change binhelper to avoid stupid user errors; now grows the buffer on demand for the specific # of bytes; fix bugs in get_data_dirs/0 (driver and erlang caller) 2008-12-17 14:45:39 -07:00
Dave Smith
68813d0a53 Adding support for list database directories and txn'lly deleting databases 2008-12-17 13:07:36 -07:00
Dave Smith
f9b3354c50 Adding support for packaging to enable easier publishing via faxien 2008-12-16 13:16:23 -07:00
Dave Smith
036e12fd62 Updating build lib to copy over the utilities 2008-12-15 15:52:24 -07:00
Dave Smith
61207c1482 Merge branch 'master' of ecommons@wax.hive:bdberl 2008-12-15 14:35:02 -07:00
Dave Smith
f80a2b2ace Enable use of environment variables for setting location of database 2008-12-15 14:33:50 -07:00
Phillip Toland
28be3ac80a Wrapped debug printfs in bdberl_drv.c with a macro
so that they can easily be removed with a recompile.
2008-12-15 15:05:41 -06:00
Dave Smith
865f8958c5 Implemented support for put_commit 2008-12-15 11:47:38 -07:00
Dave Smith
2d323cb304 Adding support for cursor operations 2008-12-15 11:25:03 -07:00
Dave Smith
f56351e1dc Overhaul driver to avoid use of pipes and simplify memory management 2008-12-15 09:23:19 -07:00
Phillip Toland
824ec5ef69 Fixes for 64bit Linux. 2008-12-12 15:26:20 -06:00
Dave Smith
987231cef9 Adding "tune" command that lets us get/set various timeouts 2008-12-11 14:13:37 -07:00
Dave Smith
cc7d95a5b7 Adding support for trickle writes to disk 2008-12-11 11:51:55 -07:00
Dave Smith
b4c6aae90c Merge branch 'master' of ecommons@wax.hive:bdberl
Conflicts:

	c_src/bdberl_drv.c
	src/bdberl_port.erl
2008-12-11 07:30:14 -07:00
Dave Smith
aa3928b2c3 Re-enable transaction timeouts 2008-12-10 21:39:38 -07:00
Dave Smith
26db2c0756 Changing from a single signal to a broadcast 2008-12-10 21:38:49 -07:00
Dave Smith
a71f18ee1b Now with 100% more threadiness and 50% less deadlocking 2008-12-10 19:47:00 -07:00
Dave Smith
8fc3cc3701 Interstitial commit 2008-12-10 18:17:44 -07:00
Phillip Toland
71f64d9666 Added flags for the txn_commit function. 2008-12-10 17:12:16 -06:00
Phillip Toland
f743d855d8 Added flags for txn_begin function. 2008-12-10 17:05:08 -06:00
Phillip Toland
332e18e7be Added flags to get function. 2008-12-10 16:57:35 -06:00
Phillip Toland
abb8ca7946 Renamed DECODE_ macros to UNPACK_ 2008-12-10 16:05:41 -06:00
Phillip Toland
7ec347c73e Added flags to the put function. 2008-12-10 16:04:34 -06:00
Phillip Toland
eab107df7a Fixed a typo: foudn -> found 2008-12-10 15:41:41 -06:00
Dave Smith
700e66ba9d First crack at a threadpool 2008-12-10 14:31:36 -07:00
Phillip Toland
cf6ef4d296 Added flags to the close_database function. 2008-12-10 12:58:54 -06:00
Phillip Toland
d2f15bef80 Clean up and expand the binary decoding macros. 2008-12-10 12:30:52 -06:00
Phillip Toland
c5e50712e1 Add the ability to pass flags to the open_database function. 2008-12-10 10:59:40 -06:00
Dave Smith
24d712840e Adding support for not_found on get and txn abort 2008-12-09 13:46:33 -07:00
Dave Smith
2f83430708 Adding support for get/put and basic transactions 2008-12-09 13:18:55 -07:00
Dave Smith
c92a48356e Adding binary helper functions to ease crazy pointer arithmetic/copying when passing data back to erlang 2008-12-08 16:30:19 -07:00
Dave Smith
cce9f59058 Fixes for 64-bit linux, courtesy of Phil Toland 2008-12-08 15:02:09 -07:00
Dave Smith
56ece164c7 Adding test code; cleanup whitespace in driver 2008-12-08 06:59:04 -07:00
Dave Smith
ade3f99f81 Open/Close now seems to be functional 2008-12-07 23:28:04 -07:00
Dave Smith
20f872cdef Lots more work on getting basic system fleshed out. Basic structures in place for tracking open databases. 2008-12-06 22:08:36 -07:00
Dave Smith
f1c52ba1c9 Various cleanup/fleshout 2008-12-05 23:52:51 -07:00
Dave Smith
ceb66315e7 Initial commit 2008-12-05 23:20:26 -07:00