| 1 |
version 0.005; 2017-08-11 |
| 2 |
|
| 3 |
* update to accommodate PERL_OP_PARENT builds of Perl 5.21.11 or later |
| 4 |
(which is the default from Perl 5.25.1) |
| 5 |
|
| 6 |
* on Perl 5.25.3 and later, where a regular hash in scalar context |
| 7 |
yields the count of items in the hash, make the tied scalar(%shash) |
| 8 |
behave equivalently |
| 9 |
|
| 10 |
* update automatic configuration to not rely on . in @INC, which is |
| 11 |
no longer necessarily there from Perl 5.25.7 |
| 12 |
|
| 13 |
* update for changed S_croak_xs_usage() prototype in ExtUtils::ParseXS |
| 14 |
3.30, requiring the new version of that module |
| 15 |
|
| 16 |
* skip t/taint.t if the perl empirically doesn't perform taint checks |
| 17 |
but the script got run anyway (which happens with an unsupported |
| 18 |
configuration of the Perl core which some people are using in the |
| 19 |
absence of a supported no-taint configuration) |
| 20 |
|
| 21 |
* test that all modules have matching version numbers |
| 22 |
|
| 23 |
* in documentation, update the stated Perl version beyond which the |
| 24 |
Unicode bug in the treatment of filenames might be fixed |
| 25 |
|
| 26 |
* no longer include a Makefile.PL in the distribution |
| 27 |
|
| 28 |
* in documentation, use four-column indentation for all verbatim |
| 29 |
material |
| 30 |
|
| 31 |
* in META.{yml,json}, point to public bug tracker |
| 32 |
|
| 33 |
* rewrite some internal recursive functions to use the cursor system |
| 34 |
|
| 35 |
* to perform static assertion in C, rather than a hand-crafted |
| 36 |
formulation, use Perl's STATIC_ASSERT_DECL() macro (from Perl 5.27.1 |
| 37 |
onwards) or STATIC_ASSERT_GLOBAL() macro (from Perl 5.21.7 until it |
| 38 |
was renamed to STATIC_ASSERT_DECL()), with a reserve definition for |
| 39 |
older Perls |
| 40 |
|
| 41 |
* avoid some compiler warnings that arise on Perl 5.6 |
| 42 |
|
| 43 |
* use cBOOL() where appropriate |
| 44 |
|
| 45 |
* remove a duplicated assignment statement |
| 46 |
|
| 47 |
version 0.004; 2015-01-28 |
| 48 |
|
| 49 |
* port to Perl 5.21.1, where errno-based error messages (as seen in |
| 50 |
$!) depend on the state of the locale pragma |
| 51 |
|
| 52 |
* port to Perl 5.21.8, where it is necessary to work around bug [perl |
| 53 |
#123558] to test deparsing |
| 54 |
|
| 55 |
* new functions shash_key_min(), shash_key_max(), shash_key_ge(), |
| 56 |
shash_key_gt(), shash_key_le(), and shash_key_lt(), to iterate over |
| 57 |
the content of a shared hash, and corresponding ability to iterate a |
| 58 |
tied hash via each(%shash) and to enumerate it via keys(%shash) et al |
| 59 |
|
| 60 |
* new functions shash_keys_array() and shash_keys_hash() to enumerate |
| 61 |
the keys in a shared hash |
| 62 |
|
| 63 |
* new function shash_group_get_hash() to retrieve the full content of |
| 64 |
a shared hash |
| 65 |
|
| 66 |
* new function shash_occupied() to check whether a shared hash is |
| 67 |
non-empty, and corresponding ability to check occupancy of a tied |
| 68 |
hash via scalar(%shash) |
| 69 |
|
| 70 |
* new function shash_count() to count the items in a shared hash |
| 71 |
|
| 72 |
* new function shash_size() to determine approximate size of the |
| 73 |
content of a shared hash |
| 74 |
|
| 75 |
* new function shash_length() to get the length of a value without |
| 76 |
reifying the value as a string SV |
| 77 |
|
| 78 |
* add clearer name shash_exists() for the existing function shash_getd() |
| 79 |
|
| 80 |
* make returned reference scalars and tally value scalars unwritable |
| 81 |
|
| 82 |
* test that keys and values can contain NULs |
| 83 |
|
| 84 |
* test unwritability of returned mode strings |
| 85 |
|
| 86 |
* in documentation, clarify that shash_tidy() counts as a write |
| 87 |
operation |
| 88 |
|
| 89 |
* in documentation, correct grammar in the description of shash_open() |
| 90 |
and the equivalent constructor method |
| 91 |
|
| 92 |
version 0.003; 2014-05-05 |
| 93 |
|
| 94 |
* bugfix: on Perl 5.6, repair a dodgy workaround that could cause |
| 95 |
magical (e.g., tainted) arguments to lose their magic flags |
| 96 |
|
| 97 |
* bugfix: build custom ops in a way that satisfies an unnecessary |
| 98 |
assertion in debugging Perl builds |
| 99 |
|
| 100 |
* new function shash_idle() to prevent an idle handle keeping an |
| 101 |
obsolete data file around |
| 102 |
|
| 103 |
* when tidying, include a non-zero constant term in the computation |
| 104 |
of the new file size, to avoid cycling data files very rapidly when |
| 105 |
the shared hash contains little data |
| 106 |
|
| 107 |
* count events for profiling and debugging, counters accessed |
| 108 |
through new functions shash_tally_get(), shash_tally_zero(), and |
| 109 |
shash_tally_gzero() |
| 110 |
|
| 111 |
* make the constant shash_referential_handle also available as a class |
| 112 |
method on Hash::SharedMem::Handle |
| 113 |
|
| 114 |
* when attempting to unlink a file, other than for cleanup of an |
| 115 |
operation that died, if unlinking fails for reasons other than ENOENT |
| 116 |
or EBUSY, report the error, rather than silently ignoring it |
| 117 |
|
| 118 |
* cooperate in the tainting system, mainly imitating the taint behaviour |
| 119 |
of regular file handles |
| 120 |
|
| 121 |
* support using the module in multiple threads simultaneously, |
| 122 |
including, on Perl 5.8.9 and later, duplicating handles for thread |
| 123 |
spawning |
| 124 |
|
| 125 |
* cope on Cygwin, which offers a fraudulent openat(2) et al |
| 126 |
|
| 127 |
* avoid a C99 declaration-after-statement construction |
| 128 |
|
| 129 |
* avoid using "NULL" for null function pointers, for C compiler |
| 130 |
portability |
| 131 |
|
| 132 |
* be cleverer about the asymmetry of key ranges in the B-tree structure, |
| 133 |
saving about one key comparison per data operation |
| 134 |
|
| 135 |
* use cursors internally, so that the key has to be resolved only |
| 136 |
once for each combined read-and-write operation (shash_gset() |
| 137 |
and shash_cset()) |
| 138 |
|
| 139 |
* when attempting a data file rollover, if the attempt fails due to |
| 140 |
a conflicting update from another process, unmap the abortive data |
| 141 |
file before attempting to unlink it, so that the unlink will succeed |
| 142 |
on OSes that need a mapped file to remain linked |
| 143 |
|
| 144 |
* in documentation, comment on the inefficiency that occurs when the |
| 145 |
shared hash doesn't fit into RAM |
| 146 |
|
| 147 |
* in documentation, comment on the Unicode bug in the treatment of |
| 148 |
filenames |
| 149 |
|
| 150 |
* don't uselessly attempt to hook into B::Deparse on Perls where custom |
| 151 |
ops aren't registered and so the hook can't work |
| 152 |
|
| 153 |
* don't uselessly attempt to hook into B::Deparse for the |
| 154 |
shash_referential_handle constant which isn't a custom op type |
| 155 |
|
| 156 |
* test concurrency with real concurrent racing processes |
| 157 |
|
| 158 |
* test that a forked handle works correctly |
| 159 |
|
| 160 |
* include magic(5) file, describing the identifying part of the format |
| 161 |
of shared hash files, in the distribution |
| 162 |
|
| 163 |
* manage destruction of shared hash handles through magic rather than |
| 164 |
a DESTROY method, for a small speedup |
| 165 |
|
| 166 |
* restructure the internal representation of directory references, |
| 167 |
for a small simplification of uses of the references |
| 168 |
|
| 169 |
* in test suite, extend to shash_tidy() some patterns of tests that |
| 170 |
cover most operators and which were missed when shash_tidy() was |
| 171 |
added to the module |
| 172 |
|
| 173 |
* slight refactoring of C code |
| 174 |
|
| 175 |
* on systems that lack mmap(2), detect the problem cleanly and report |
| 176 |
it in a way that CPAN Testers understand |
| 177 |
|
| 178 |
* in design document and code, use the more standard term "fanout" |
| 179 |
instead of "splay" |
| 180 |
|
| 181 |
* take todo notes out of code comments |
| 182 |
|
| 183 |
version 0.002; 2014-03-25 |
| 184 |
|
| 185 |
* new function shash_tidy() to make data file rollover happen at a |
| 186 |
convenient time |
| 187 |
|
| 188 |
* in many error messages, state more specifically and consistently |
| 189 |
what kind of action has failed |
| 190 |
|
| 191 |
* in documentation, consistently describe the content of a shared hash |
| 192 |
as "content" rather than "contents" |
| 193 |
|
| 194 |
version 0.001; 2014-03-23 |
| 195 |
|
| 196 |
* bugfix: avoid overflowing a directory entry buffer on OSes where |
| 197 |
struct dirent is not a suitable size for a buffer |
| 198 |
|
| 199 |
* bugfix: avoid overflowing a filename buffer when time exceeds the |
| 200 |
32-bit range (a year 2038 problem) or PIDs are larger than 32 bits |
| 201 |
|
| 202 |
* ensure reliable behaviour across fork(2), by not holding on to |
| 203 |
allocated data file space between write operations |
| 204 |
|
| 205 |
* create all data files with the same permission bits as the master |
| 206 |
file, so that the permissions set when the shash was created stick, |
| 207 |
and the umask at the time of shash operations doesn't matter |
| 208 |
|
| 209 |
* attempt to give all data files the same group and owner as the master |
| 210 |
file, so that permissions behave as consistently as possible |
| 211 |
|
| 212 |
* new exported constant shash_referential_handle to indicate whether |
| 213 |
shared hash handles constitute first-class references to the |
| 214 |
underlying files |
| 215 |
|
| 216 |
* detect non-octet string values for key and value parameters reliably |
| 217 |
and early, consistently signalling the error |
| 218 |
|
| 219 |
* detect non-string values for filename parameters, signalling the error |
| 220 |
|
| 221 |
* process get magic on each parameter exactly once per hash operation |
| 222 |
(though users of the tied interface are at the mercy of the tying |
| 223 |
infrastructure, which doesn't have such clean behaviour) |
| 224 |
|
| 225 |
* when attempting to clean a shash directory, if listing the directory |
| 226 |
fails, report the error, rather than silently abandoning the cleaning |
| 227 |
attempt |
| 228 |
|
| 229 |
* when attempting to generate a new data file, if the size is so large |
| 230 |
as to cast to a negative off_t value, detect it early and report |
| 231 |
EFBIG, rather than going ahead to create the file and detect the |
| 232 |
error at ftruncate(2) time |
| 233 |
|
| 234 |
* if ftruncate(2) reports that a requested file size is too big using |
| 235 |
errno EINVAL, report it as the more enlightening EFBIG |
| 236 |
|
| 237 |
* when attempting to iterate a shash directory, if opening the directory |
| 238 |
fails, detect it and report the real error, rather than going ahead |
| 239 |
to fdopendir(3) and detecting its EBADF |
| 240 |
|
| 241 |
* when reporting an error including the name of a shash, to match |
| 242 |
user expectations use the characters of the filename scalar that |
| 243 |
was supplied upon opening, even though the octets of the scalar's |
| 244 |
internal representation are what are actually used as the filename |
| 245 |
|
| 246 |
* automatically detect and adapt to the machine architecture's line |
| 247 |
and page size, to improve performance on architectures other than |
| 248 |
IA32/AMD64 |
| 249 |
|
| 250 |
* port to pre-5.14 Perls, back to 5.6 |
| 251 |
|
| 252 |
* automatically use the -lrt library on systems where it is required |
| 253 |
in order to get access to clock_gettime(2) |
| 254 |
|
| 255 |
* cope on systems where openat(2) et al are not available, either not |
| 256 |
defined by the headers, or defined but not functioning |
| 257 |
|
| 258 |
* cope on systems where clock_gettime(2) is not available, either not |
| 259 |
defined by the headers, or defined but not functioning |
| 260 |
|
| 261 |
* cope on systems where O_CLOEXEC is not available, either not defined |
| 262 |
by the headers, or defined but not honoured (or not accepted) by |
| 263 |
the kernel |
| 264 |
|
| 265 |
* when iterating a shash directory, open a new file descriptor rather |
| 266 |
than duplicate the existing one, avoiding portability problems with |
| 267 |
F_DUPFD_CLOEXEC |
| 268 |
|
| 269 |
* use symbolic constants for file permission bits, for portability to |
| 270 |
systems where they have non-traditional values |
| 271 |
|
| 272 |
* cope on systems where the headers don't define MAP_FAILED |
| 273 |
|
| 274 |
* check at compile time that the word data type is of exactly the |
| 275 |
required size |
| 276 |
|
| 277 |
* on Perls that support it, hook into B::Deparse to make the custom |
| 278 |
ops deparse nicely |
| 279 |
|
| 280 |
* many new tests |
| 281 |
|
| 282 |
* document the effects of file-level operations on shared hash |
| 283 |
directories |
| 284 |
|
| 285 |
* document the tied(%shash) operator as part of the tied interface |
| 286 |
|
| 287 |
* clarify documentation about permitted keys and values |
| 288 |
|
| 289 |
* in documentation, mention serialisation and refer to Sereal |
| 290 |
|
| 291 |
* perform string equality comparisons more efficiently by specific |
| 292 |
code separate from ordering comparisons |
| 293 |
|
| 294 |
* use more efficient variants of Perl API functions where available |
| 295 |
|
| 296 |
* use the Perl-version-dependent matching data type to save |
| 297 |
PL_tmps_floor, rather than an invariant sufficiently-large type |
| 298 |
|
| 299 |
* declare C functions as inline where it'll help for compilers that |
| 300 |
need the hint |
| 301 |
|
| 302 |
* make some printf operations cheaper by taking advantage of Perl's |
| 303 |
requirement that the C int type is at least 32 bits |
| 304 |
|
| 305 |
* shuffle C struct members for better packing on 32-bit systems |
| 306 |
|
| 307 |
* small clarifications to design document |
| 308 |
|
| 309 |
* slight refactoring of C code |
| 310 |
|
| 311 |
* avoid some C compiler warnings |
| 312 |
|
| 313 |
version 0.000; 2014-02-27 |
| 314 |
|
| 315 |
* initial released version |