Opened 6 months ago

Closed 6 months ago

#18824 closed enhancement (fixed)

xapian-core-1.4.24

Reported by: Bruce Dubbs Owned by: Douglas R. Reno
Priority: normal Milestone: 12.1
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

New point version.

Change History (3)

comment:1 by Douglas R. Reno, 6 months ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:2 by Douglas R. Reno, 6 months ago

Xapian-core 1.4.24 (2023-11-06):

testsuite:

  • apitest: Add coverage that docids generated by replace_document() don't wrap to nomoredocids1 testcase.
  • unittest: Improve block file functions unit test which were (unintentionally) trying to test with a 4TB sparse file, which not all platforms support. A file just over 4GB is enough to test what we want, and if we trying to create one fails with errno EFBIG, indicating the file size is too large, we now skip the rest of the testcase.
  • unittest: Catch Xapian::Error exceptions and rethrow the std::string returned by get_description() as the utestsuite harness doesn't know about Xapian::Error so was confusingly reporting it as "UNKNOWN EXCEPTION".
  • The testsuite no longer reports NULL as the address associated with a signal when running on a platform without both sigaction() and SA_SIGINFO.

matcher:

  • Reorder fields in each MSet entry to avoid structure padding on x86-64 probably other 64-bit platforms. This reduces the memory needed to hold an MSet by 8 bytes per entry on such platforms.

glass backend:

  • Eliminate unnecessary memory allocations. When committing changes, we were allocating blocks for all possible levels of the built-in cursor in each writable table, even those levels that weren't in use.

The worst case is a really small database with all optional tables existing which would have 54 unused allocations of blocksize + 8 bytes, which with the default 8K block size is ~432KB per WritableDatabase; if you explicitly ask for 64K block size it'll be ~3.4MB.

For a more typical WritableDatabase it's probably going to be more like half these numbers.

build system:

  • Add --enable-werror configure option.
  • configure: Only auto-enable -D_FORTIFY_SOURCE=2 if it works without additional libraries and remove the hard-coded block against using it on mingw. Mingw-w64 v11.0.0 eliminated the requirement to link with -lssp and with this change we now auto-enable -D_FORTIFY_SOURCE=2 for it.

portability:

  • We now avoid triggering SIGPIPE in library code on most platforms.

On Unix-like platforms we want to avoid generating SIGPIPE when writing to a socket when the other end has been closed since signals break the encapsulation of what we're doing inside the library - either user code would need to handle the SIGPIPE, or we set a signal handler for SIGPIPE but that would handle *any* SIGPIPE in the process, not just those we might trigger, and that could break user code which expects to trigger and handle SIGPIPE.

We don't need SIGPIPE since we can check errno==EPIPE instead (which is actually simpler to do).

It seems all current Unix-like platforms now support SO_NOSIGPIPE or MSG_NOSIGNAL, so currently we just fall back to setting SIGPIPE to SIG_IGN. If there are actually current platforms which have SIGPIPE without SO_NOSIGPIPE or MSG_NOSIGNAL then we can look at other ways to avoid generating the signal.

  • Avoid MSVC warning C4312 which is a reasonable warning in general, but in this case we checked that the value wasn't truncated when cast to an int.
  • Use TEST_EQUAL_DOUBLE in netstats1 testcase which fixes testcase failure on FreeBSD.
  • Address GCC13 -Wredundant-move warnings. In 1.4.10 we added std::move() here to address clang warnings from -Wreturn-std-move (enabled by -Wall). Just removing the std::move() reintroduces those warning with clang 8 and clang 11 (but not clang 13 or later) but changing to apply a static_cast to the returned type seems to make all versions of both compilers happy.
  • Fix build with UCRT64 variant of mingw-w64 by stopping defining MSVCRT_VERSION by default. It looks like doing so hasn't been needed since 2015.
  • Add workaround for testsuite failures under Wine where attempting to unlink a stub file sometimes fails with errno == EACCES and _doserrno == ERROR_SHARING_VIOLATION. This is what you'd get if the file was still open, but we've already closed it. Sleeping for a second and retrying makes it work, so we now do that. It'd be better to get to the bottom of what's going on, but I've run out of ideas and this workaround is only in the testharness at least.

debug code:

  • xapian-inspect:

+ goto and until now go to the entry *after* the specified key if there's

no exact match, which seems more natural.

+ New count" command. This is actually just the same as until` which

already reports a count of the number of entries advanced by, except that count suppresses printing each entry.

comment:3 by Douglas R. Reno, 6 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.