Ondřej Kuzník [Mon, 23 Jan 2023 11:48:33 +0000 (11:48 +0000)]
ITS#9045 rlock only if there may be other threads
We can't rlock if we've registered ourselves as a writer. We can only
figure that out by checking if we're the thread that initiated the
pause: is the server paused already?
Ondřej Kuzník [Wed, 18 Jan 2023 12:28:05 +0000 (12:28 +0000)]
ITS#9930 Just wait until si_mutex is ready
We're in a much better place now and there is only a single task active
for a given syncinfo_t plus the task that's just scheduled it and is
wrapping up. Any remaining times this wouldn't be true are probably bugs
to be fixed.
Ondřej Kuzník [Wed, 18 Jan 2023 13:03:23 +0000 (13:03 +0000)]
ITS#9983 Rework op->o_refcnt decref sequencing
epoch_append should be called at the point the object is not reachable
anymore, otherwise a thread from a "future" might still access it post
reclamation.
Howard Chu [Thu, 3 Nov 2022 17:42:36 +0000 (17:42 +0000)]
ITS#9929: more performance tweaks
For simple (non-nested) member compares, avoid unnecessary fetches
of dyngroups that can't match the filter.
cache filter/entry instance info across multiple dyn entries to
avoid refetching each filter entry for each dyngruop test.
Howard Chu [Tue, 15 Nov 2022 15:33:48 +0000 (15:33 +0000)]
ITS#9916 liblmdb: use alternate MDB_page2 struct for some accesses
fakepage pointers are only guaranteed to be 2-byte aligned. Use a
2-byte aligned struct definition when referencing 2-byte page members
if a page pointer possibly points to a fakepage.
Ondřej Kuzník [Wed, 26 Oct 2022 14:55:18 +0000 (15:55 +0100)]
ITS#9045 Do not share cn=config entries with outside code
config_back_entry_get currently returns the entry directly without
securing the rwlock, which is unsafe. However we can't keep holding it
on return in case the caller decides to hold onto the entry
indefinitely, hence rlock+entry_dup+runlock.
Ondřej Kuzník [Mon, 31 Oct 2022 09:26:12 +0000 (09:26 +0000)]
ITS#9598 Do not track olcIncomingConnections in lloadd/test007
Some values we export in cn=monitor are not managed in a single place,
instead, a task exists that gathers a snapshot of the lloadd state and
stores it for monitor consumption. This exposes a race between the test
reading it out and lloadd updating this cached copy. While we still have
to rely on a shell, rather than being intelligent about whether or not
we should emit a readout into search.out or wait and try again (which is
what test004-monitor does), just filter this attribute out.
Connor Smith [Mon, 3 Oct 2022 10:11:10 +0000 (11:11 +0100)]
ITS#9925 Fix some ancient #ifdef checks
Use #elif defined(...) for HAVE_WINSOCK and MACOS. All other instances
of these macros use #ifdef or similar. A compiler may warn about them
not being defined.
In libraries/liblber/sockbuf.c, (DOS && PCNFS) and (DOS && NCSA) were
replaced with HAVE_PCNFS and HAVE_NCSA, respectively. It seems logical
to do the same at the only remaining occurrence of DOS, PCNFS, and NCSA.
Use #if HARDCODE_DATA consistently, replacing two instances of #ifdef.
HARDCODE_DATA is always defined, and this way you can set HARDCODE_DATA
to 0 and have it work, rather than it going down the wrong branch and
failing in these two cases.
Thomas Daniels [Mon, 19 Sep 2022 22:30:05 +0000 (00:30 +0200)]
Remove 'h' and 'p' from options[] in client tools
The options -h and -p got removed from client tools in commit 66af4cfd5d3c559fcdf6d722b02fa66416b95f01. However, they were still
present in the options[] array in several client tools source files. So,
if one of those tools got executed with -h or -p followed by a value,
this lead to the error "unrecognized option -", without mentioning
which option was problematic. Removing 'h' and 'p' from options[] fixes
this.
ITS#9878 Have refint use interval 0 to schedule its task
Since the task is not rescheduled until a new operation comes in, close
a race where the reschedule chooses to stop it while the new item is
being added.
ITS#9878 Treat tasks with interval == 0 as one-shot
Some tasks need to be run once at a given time or the earliest
opportunity, also currently, using interval == 0 on a task triggers
a busy loop inside the scheduling task, halting progress for other
tasks and any other work usually serviced by that thread.
This change deals with both issues at the same time.