I just imported the hamsterdb sources to a github repository.
There were a few reasons for this, mainly
I was fed up with repairing broken svn repositories, i had to use “svnadmin recover” every second week and afterwards i had to fix broken file permissions for the bdb logfiles. One repository was broken beyond repair.
I hope to make collaborating easier by moving to an open platform
github offers a lot of features (i.e. a Wiki) that i could utilise, and i am happy if someone else does the server maintenance for me
If you want to browse the sources, see the most recent changes or branch off your own hamsterdb then please go to http://github.com/cruppstahl/hamsterdb. Everyone’s invited
This release implements remote functionality over http. The protocol is implemented with Google’s Protocol Buffers, the client uses libcurl for network handling and the server is based on mongoose, an embedded micro http server.
The server interface is very simple, and the server can easily be embedded into an application.
There are no known bugs, but currently the remote functionality is only supported on Unix/Linux. The next version 1.1.6 will also support the new features on Win32; several other improvements are also pending for the next release: a unix daemon, a win32 service and some other minor issues.
This is mainly a bugfix release, and in case you’re not haunted by these bugs, there’s no need for you to update.
First one: hamsterdb only supports one Transaction at a time, but nevertheless it was allowed to create temporary, unnamed Transactions while another one was already running. -> fixed
Second one: on win32, if you have a cache size of more than a gigabyte and fill up the cache then the non-paged memory pool can be exhausted. -> fixed
What else? some macros in the header file were renamed for consistency reasons, but the old macros still exist and source compatibility was not broken.
Four weeks after 1.1.2, here’s the next! The headline is “partial read/write” - records can now be read or written partially. This can be a benefit if your records are REALLY big. But it will also enable you to “stream” records.
This feature caused changes in the layout of ham_record_t. Therefore the ABI of hamsterdb is no longer compatible (but the API and the database file format are compatible). To avoid crashes, i incremented the libtool version and embedded the hamsterdb version in the win32 dll/lib filenames.
Also, i fixed a performance related bug in the caching - 1.1.3 should therefore be much faster than 1.1.2.
I added a new function “ham_get_env” to retrieve the Environment handle of a Database. (This handle always exists, even if it was not created explicitely).
Duplicate keys can now be sorted. Sorting has to be enabled with HAM_SORT_DUPLICATES. The default collation can be overwritten with ham_set_duplicate_compare_func.
Bugfixes
If multiple Databases in an Environment are open, an open Transaction was not immediately closed when the first Database was closed (with ham_close)
If multiple Databases in an Environment are open, and just one Database was closed, then the pages of this Database were not flushed correctly
Fixed crash on Linux 64bit/gcc 4.4 with compiler optimization
Other Changes
The documentation is now reduced to public interfaces; internal documentation is only built when requested
I received several reports that hamsterdb crashes on 64bit linux with gcc 4.4.1 on Ubuntu (but maybe not restricted to Ubuntu).
I did some tests with gcc and the following gcc versions work fine:
4.1.3 20080704 (prerelease) (Debian 4.1.2-27)
4.3.4 (Debian 4.3.4-6)
4.4.3 20100108 (prerelease) (Debian 4.4.2-9)
It seems that the problem is only in 4.4.1 and maybe 4.4.2. To find out if your gcc has the same issue, just make a clean build and start the unittest; they would crash more or less immediately:
./configure –enable-internal
make clean
make
make test
I’ll try to get more test results…
update (jan 17, 2010) - i fixed the issues. They were caused by gcc’s “strict antialiasing” which caused crashes when compiled with -O3.