RT# 50541: Fix for clear bug. Introduces a speed regression
[dbsrgits/DBM-Deep.git] / Changes
1 Revision history for DBM::Deep.
2
3 1.0019_002 Jan XX XX:00:00 2010 EST
4     (This is the second developer release for 1.0020.)
5     (This version is compatible with 1.0014)
6         - Fixed bug where attempting to store a value tied to something other than
7       DBM::Deep would leave the file flocked.
8         - Added support for DBD::SQLite
9         - Build.PL has been extended to support sqlite vs. mysql
10         - Storage::DBI now detects between the two DBDs
11     - (RT #51888) Applied POD patch (Thanks, FWIE!)
12     - (RT #44981) Added VERSION to ::Array, ::Engine, and ::Hash
13     - Removed extraneous slashes from POD links (Thanks ilmari!)
14     - (RT #50541) Fixed bug in clear() for hashes in the File backend.
15         - This has caused a regression in speed for clear() when clearing
16           large hashes using running with the File backend. ->clear() (on my
17           machine) now takes ( N / 40 ) ** (1.66) seconds. So, clearing 4000
18           keys (as is the test in t/03_bighash.t) would take ~2070 seconds.
19
20 1.0019_001 Dec 31 22:00:00 2009 EST
21     (This is the first developer release for 1.0020.)
22     (This version is compatible with 1.0014)
23         - DBM::Deep has been refactored to allow for multiple engines. There are two
24       engines built so far:
25         - File (the original engine)
26         - DBI (an engine based on DBI)
27     - The DBI engine has only been tested on MySQL and isn't transactional.
28         - InnoDB sucks horribly. When run in a sufficient isolation mode, it
29           creates deadlocks. 
30     - A custom Build.PL has been written to allow for running tests under
31       CPAN.pm against the various engines.
32         - This also allows running the long tests under CPAN.pm
33     - This has meant a ton of refactoring. Hopefullly, this refactoring will
34       allow finding some of the niggly bugs more easily. Those tests have not
35       been enabled yet. That's the next developer release.
36     - Hopefully, this multi-engine support will allow deprecation of the file
37       format in the future.
38
39 1.0014 Jun 13 23:15:00 2008 EST
40     - (This version is compatible with 1.0013)
41     - Fix for RT#36781 (t/44 has an unrequired dependency)
42     - lock() has been aliased to lock_exclusive(). There is now
43       a lock_shared() method. The :flock constants are no longer
44       imported into the DBM::Deep namespace.
45       **** THIS IS AN API CHANGE ****
46
47 1.0013 Jun 13 23:15:00 2008 EST
48     - (This version is compatible with 1.0012)
49     - Fix for RT#30144 (Optimization failure on Win32)
50     - Fixed a bug in reindex_entry (Thanks, Wulfram Humann!)
51
52 1.0012 Jun 09 15:00:00 2008 EST
53     - (This version is compatible with 1.0011)
54     - Fix for RT#30085 (Remove dependency on XS module)
55         - Thank you very much tachyon-II@Perlmonks!!
56         - This also resolves RT#35424 (DBM::Deep breaks XML::Twig).
57     - Updated the POD with fixes that were made, but still on the TODO list.
58     - Bypass for RT#36419 (t/44_upgrade_db.t fails on *BSD)
59         - We're just going to skip that for now. It's a number-of-processes-open
60         issue. Best is to do a port to another module to do the heavy lifting.
61
62 1.0011 May 27 15:00:00 2008 EST
63     - (This version is compatible with 1.0010)
64     - A test has the wrong plan.
65
66 1.0010 May 27 12:00:00 2008 EST
67     - (This version is compatible with 1.0009)
68     - Fix for RT#35140 (invalid POD links)
69     - Fix for RT#34819 (Cannot assign the same value back to the same location)
70     - Fix for RT#29957 (Cannot assign the same value back to the same location)
71     - Fix for RT#33863 (Cannot shift an arrayref from an array)
72     - When something is deleted from a DB, the value is export()ed, allowing it
73       to be saved.
74       - This exporting is only done if the refcount == 0 after the deletion.
75
76 1.0009 Mar 19 12:00:00 2008 EDT
77     - (This version is compatible with 1.0008)
78     - Internal refactorings to prepare for some optimizations.
79         - _fh() has been removed. It was marked as private, so don't complain.
80     - Skip a test that was spuriously failing on Win32 (Thanks, Alias!)
81
82 1.0008 Mar 09 20:00:00 2008 EDT
83     - (This version is compatible with 1.0007)
84     - Fixed a number of Win32 issues (Reported by Steven Samelson - thank you!)
85         - Much thanks to Nigel Sandever and David Golden for their help
86           debugging the issues, particularly with DBM::Deep's usage of
87           File::Temp (which removes a number of warnings).
88         - Autovivification now works on Win32. It turns out that when a
89           process takes a shared flock on a file, it's not allowed to write to
90           it under Win32, unlike *nix. This is probably a good catch.
91             - Note: The fix is a hack. All locks are now exclusive until a
92               better fix is found.
93
94 1.0007 Jan 10 00:00:00 2008 EDT
95     - (This version is compatible with 1.0006)
96     - Applied a patch+failing test submitted by sprout@cpan.org. Thanks!
97       - Turns out that the case of 17 keys with the same first character in the
98         MD5 hash wasn't being tested for. This was a crashbug.
99     - A fix has been made to upgrade_db.pl (RT# 30067)
100       - The version determinations were in the wrong order or evaluation. This
101         meant that upgrade_db.pl wouldn't work as expected (or at all).
102     - Added a minimum Pod::Usage requirement (RT# 29976)
103       - It's an optional item in Build.PL
104       - utils/upgrade_db.pl now checks for that version, as does the test.
105
106 1.0006 Oct 01 23:15:00 2007 EDT
107     - (This version is compatible with 1.0005)
108     - Removed Clone and replaced it with a hand-written datastructure walker.
109       - This greatly reduces the footprint of a large import
110       - This bypasses a failure of Clone under Perl 5.9.5
111       - Moved t/37_delete_edge_cases.t to t_attic because it wasn't really used
112     - import() has a stricter API now. This is a potentially incompatible API
113       change. Only HASH and ARRAY refs are now allowed and they must match the type
114       of the object being imported into.
115
116 1.0005 Oct 01 11:15:00 2007 EDT
117     - (This version is compatible with 1.0004)
118     - Added proper singleton support. This means that the following now works:
119         $db->{foo} = [ 1 .. 3];
120         my $x = $db->{foo};
121         my $y = $db->{foo};
122         is( $x, $y ); # Now passes
123       - This means that Data::Dumper now properly reports when $db->{foo} = $db->{bar}
124
125 1.0004 Sep 28 12:15:00 2007 EDT
126     - (This version is compatible with 1.0003)
127     - Fixed the Changes file (wrong version was displayed for 1.0003)
128     - Added filter sugar methods to be more API-compatible with other DBMs
129       - This was added to support a patch provided to IO::All so it can
130         use DBM::Deep as a DBM provider.
131     - Implemented _dump_file in order to display the file structure. As a
132       result, the following bugs were fixed:
133       - Arrays and hashes now clean up after themselves better.
134       - Bucketlists now clean up after themselves better.
135       - Reindexing properly clears the old bucketlist before freeing it.
136
137 1.0003 Sep 24 14:00:00 2007 EDT
138     - THIS VERSION IS INCOMPATIBLE WITH FILES FROM ALL OTHER PRIOR VERSIONS.
139     - Further fixes for unshift/shift/splice and references (RT# 29583)
140     - To fix that, I had to put support for real references in.
141       - the 16 and 22 tests are now re-enabled.
142       - Yes, this means that real references work. See t/45_references.t
143
144 1.0002 Sep 20 22:00:00 2007 EDT
145     - (This version is compatible with 1.0001)
146     - Expanded _throw_error() so that it provides better information.
147       (Thanks brian d foy!)
148     - Fixed how shift, unshift, and splice work when there are references
149       being moved. It now no longer dies.
150     - Added diag in t/17_import.t to note that the failing tests on blead
151       are due to Clone being broken, not DBM::Deep. The tests will still
152       fail because I don't want users to install something that's broken
153       and deal with those bug reports.
154
155 1.0001 Mar 12 16:15:00 2007 EDT
156     - (This version is compatible with 1.0000)
157     - Added a missing dependency on IO::Scalar (RT #25387)
158     - Fixed how t/44_upgrade_db.t and utils/upgrade_db.pl worked
159       - utils/upgrade_db.pl now uses #!perl, not #!/usr/bin/perl
160       - t/44_upgrade_db.t now explicitly calls $^X
161         (Thanks merlyn!)
162
163 1.0000 Feb 26 22:30:00 2007 EST
164     - THIS VERSION IS INCOMPATIBLE WITH FILES FROM ALL OTHER PRIOR VERSIONS.
165       - To aid in this form of upgrades, DBM::Deep now checks the file format
166         version to make sure that it knows how to read it.
167       - db_upgrade.pl was added to utils/. This will -NOT- install onto
168         your system. This is deliberate.
169       - db_upgrade.pl will not handle developer release file formats. This
170         is due to the fact that all developer releases in preparation for a
171         given release share the same file version, even though the file
172         format may change. This is deliberate.
173     - Importing no longer takes place within a transaction
174     - The following parameters were added:
175       - data_sector_size - this determines the default size of a data sector.
176     - Correctly handle opening readonly files
177
178 0.99_04 Jan 24 22:30:00 2007 EST
179     - Added the missing lib/DBM/Deep.pod file to the MANIFEST
180     - Fixed a poorly-designed test that was failing depending on what Clone::Any
181       was using.
182     - All "use 5.6.0;" lines are now "use 5.006_000;" to avoid warnings about
183       unsupported vstrings in 5.9.x
184
185 0.99_03 Jan 23 22:30:00 2007 EST
186     - THIS VERSION IS INCOMPATIBLE WITH FILES FROM ALL OTHER PRIOR VERSIONS.
187       - The fileformat changed completely. I will be writing a converter, but
188         it's not there right now. Do NOT expect that this module will
189         correctly detect older versions and handle them sanely. Sanity will be
190         there for 1.00, but we're not there yet, are we?
191     - Converted to use FileHandle::Fmode to handle filehandle status checks
192     - Fixed bug with deleting already-deleted items on Win32 (reported by Nigel Sandever)
193     - The guts of how transactions work has been rewritten to better handle
194       some edgecases. This required a complete rewrite of the engine.
195     - Freespace management is now in place. It's not perfect, but it's there.
196     - The rewrite of the engine required a rewrite of how first_key/next_key
197       was implemented. This should result in significant speed improvements.
198     - Self-reference has been removed. This means you cannot do:
199           $db->{foo} = { x => 'y' };
200           $db->{bar} = $db->{foo};
201       I hope to be able to return this functionality by 1.00, but I cannot
202       promise anything. To do this properly, it requires refcounting in order
203       to correctly handle deletions and transactions. Once you move away from
204       a simple tree, everything becomes really hard.
205
206 0.99_02 Apr 28 05:00:00 2006 Pacific
207     - Added missing file to the MANIFEST
208
209 0.99_01 Apr 27 18:00:00 2006 Pacific
210     - Added explicit dependency on Perl 5.6.0
211       - Digest::MD5 requires 5.6.0
212       - Sub::Uplevel (dep of Test::Exception) requires 5.6.0
213     - Removed error()/clear_error()
214       - All error-handling is done with die()
215     - Broke out DBM::Deep's code into DBM::Deep::Engine
216     - Tied variables can no longer be assigned to a DBM::Deep object.
217       - This includes cross-file assignments.
218     - Autovivification now works
219       - This is a consequence of the fact that all assignments are tied.
220     - set_pack() and set_digest() have been removed.
221       - Instead, you will now pass the appropriate values into new()
222       - A pack_size parameter has been added to make 64-bit files easier
223     - Transactions now work
224
225 0.983 Apr 10 20:00:00 2006 Pacific
226     - Added patch inspired by Jeff Janes (Thanks!)
227       - Autovivification now works correctly
228       - The following now works correctly
229         my %hash = ( a => 1 );
230         $db->{hash} = \%hash;
231         $hash{b} = 2;
232         cmp_ok( $db->{hash}{b}, '==', 2 );
233     - (RT#18530) - DBM::Deep now plays nicely with -l
234
235 0.982 Mar 08 11:00:00 2006 Pacific
236     - Fixed smoketests that were failing on Win32
237     - Added restriction for Perl 5.6.0 or higher.
238       - Digest::MD5 and Sub::Uplevel (dep of Test::Exception) require 5.6+
239
240 0.981 Mar 06 11:00:00 2006 Pacific
241     - (RT#17947) - Fixed test that was failing on older Perls
242
243 0.98  Feb 28 11:00:00 2006 Pacific
244     - Added in patch by David Cantrell to allow use of DATA filehandle
245     - Fixed bug where attempting to export() a structure that used autobless would die
246     - Fixed arraytest slowness by localizing $SIG{__DIE__} to prevent Test::Builder's
247       $SIG{__DIE__} from being called. (q.v. http://perldoc.perl.org/functions/eval.html)
248     - More methods have been made private:
249         - root() is now _root()
250         - base_offset() is now _base_offset()
251         - fh() is now _fh()
252         - type() is now _type()
253         - precalc_sizes() is now _precalc_sizes()
254
255 0.97  Feb 24 10:00:00 2006 Pacific
256     - Reorganization of distribution to a more standard layout
257     - Migration to Module::Build with EU::MM backwards compatibility
258     - Migration of all tests to use Test::More and Test::Exception
259     - Added Devel::Cover report to DBM::Deep POD
260       - Test coverage improved to 89.6% (and climbing)
261     - The following methods have been renamed to reflect their private nature:
262         - init() is now _init()
263         - open() is now _open()
264         - close() is now _close()
265         - load_tag() is now _load_tag()
266         - index_lookup() is now _index_lookup()
267         - add_bucket() is now _add_bucket()
268         - get_bucket_value() is now _get_bucket_value()
269         - delete_bucket() is now _delete_bucket()
270         - bucket_exists() is now _bucket_exists()
271         - find_bucket_list() is now _find_bucket_list()
272         - traverse_index() is now _traverse_index()
273         - get_next_key() is now _get_next_key()
274         - copy_node() is now _copy_node()
275         - throw_error() is now _throw_error()
276     - The various tied classes have been broken out. This means that testing
277         "ref( $obj ) eq 'DBM::Deep'" will now fail. The correct test is
278         "eval { $obj->isa( 'DBM::Deep' ) }".
279     - The various methods like push and delete now have the same return values as
280       the standard builtins.
281     - TIEARRAY and TIEHASH now check their parameters more thoroughly
282     - Negative indices for arrays works as expected, including throwing the appropriate
283       errors.
284     - RT #16877 is fixed (DBM::Deep broken with Perl 5.9.3+).
285     - RT #14893 is fixed (tie() and new() use different parameter lists).
286     - A bug with optimize and threading is fixed.
287     - autobless has received some attention, resulting in a number of bugs fixed.
288     - Removed mode option as it just caused confusion.
289     - Removed volatile option as it is pretty useless (use locking instead)
290     - Locking now implicitly enables autoflush
291
292 0.96  Oct 14 09:55:00 2005 Pacific
293     - Fixed build (OS X hidden files killed it)
294     - You can now pass in an optional filehandle to the constructor
295
296 0.95  Oct 12 13:58:00 2005 Pacific
297     - Added optional autobless flag to preserve and restore blessed hashes
298     - Fixed bug where 0 could not be fetched using get_next_key
299     - Fixed bug where tie() constructor didn't accept a hash ref for args
300     - optimize() now preserves user/group/permissions
301     - Errors are now FATAL (meaning it calls die()), unless you set debug flag
302
303 0.94  Apr 13 19:00:26 2004 Pacific
304     - Fixed bug reported by John Cardenas (corruption at key level when
305          replace of less data was done on bucket)
306
307 0.93  Feb 15 19:53:17 2004 Pacific
308     - Fixed optmize() on Win32 where orig file couldn't be overwritten unless
309          filehandle was closed first.  This change introduces a potential race
310          condition when using locking and optmize() on Win32, but it can be 
311          fixed in the future using a soft copy instead of Perl's rename().
312
313 0.92  Feb 12 19:10:22 2004 Pacific
314     - Fixed bug where passing a reference to a different DBM::Deep object
315          would still result in an internal reference.
316     - Added export() method for recursively extracting hashes/arrays into
317          standard in-memory Perl structures.
318     - Added import() method for recursively importing existing Perl hash/
319          array structures
320     - Fixed bug where optimize() wouldn't work if base level of DB was
321          an array instead of a hash.
322
323 0.91  Feb 12 02:30:22 2004 Pacific
324     - Fixed bug with splice() when length of removed section was 0
325     - Updated POD re: circular refs and optimize()
326     - Had to jump version numbers to 0.91 because in previous releases
327          I used only a single digit after the decimal which was confusing
328          the CPAN indexer.
329
330 0.10  Feb 11 08:58:35 2004 Pacific
331     - Fixed bug where default file mode was CLEARING files (Thanks Rich!)
332     - Added experimental support for circular references
333     - Fixed bugs in shift(), unshift() and splice() where nested objects
334         in array would be recursively re-stored as basic hashes/arrays
335     - Fixed typos in POD docs
336
337 0.9   Feb 10 03:25:48 2004 Pacific
338     - Added Filters for storing/fetching keys/values
339     - Added hook for supplying own hashing algorithm
340     - FIxed some typos in POD docs, added new sections
341
342 0.8   Feb 8 02:38:22 2004 Pacific
343     - Renamed to DBM::Deep for CPAN
344     - Added optimize() method for rekindling unused space
345     - Now returning hybrid tie()/OO object from new()
346     - Basic error handling introduced
347     - Added debug mode for printing errors to STDERR
348     - Added TYPE_HASH and TYPE_ARRAY constants for "type" param
349     - Added clone() method for safe copying of objects
350     - Wrote POD documentation
351     - Added set_pack() function for manipulating LONG_SIZE / LONG_PACK
352     - Added aliases for most tied functions for public use
353     - Now setting binmode() on FileHandle for Win32
354     - Added 45 unit tests
355
356 0.7   Jan 4 11:31:50 2003 UTC
357     - Renamed to DeepDB
358     - Changed file signature to DPDB (not compatible with older versions)
359     - Converted array length to packed long instead of sprintf()ed string
360
361 0.6   Dec 31 15:12:03 2002 UTC
362     - Some misc optimizations for speed
363
364 0.5   Oct 18 08:55:29 2002 UTC
365     - support for force_return_next parameter in traverse_index() method for 
366       ultra-fast combined key search/removal
367
368 0.4   Oct 15 20:07:47 2002 UTC
369     - now making sure filehandle is open for all DB calls
370
371 0.3   Oct 3 19:04:13 2002 UTC
372     - fixed bug that could cause corrupted data when using locking
373
374 0.2   Aug 6 16:37:32 2002 UTC
375     - Removed base index caching, as it can cause problems when two processes 
376       are populating the db at the same time (even with locking)
377
378 0.1   Jun 3 08:06:26 2002 UTC
379     - initial release