Martin Michaelis [Tue, 16 Feb 2021 20:06:50 +0000 (21:06 +0100)]
stats: openmentrics: Change histogram bucket unit to seconds
In ae678116a79fff609cdf4fb1eb7eb3db2975bf1c the unit of durations was changed
from microseconds to seconds, but the `le` field in histograms is still in
microseconds.
Stephan Bosch [Fri, 4 Jan 2019 08:57:37 +0000 (09:57 +0100)]
plugins: fts-solr: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
Stephan Bosch [Fri, 4 Jan 2019 08:55:20 +0000 (09:55 +0100)]
plugins: fts: tika: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
lib-master: Fix haproxy PROXY protocol LOCAL type connection behavior when header includes address information or TLVs
PROXY protocol LOCAL type headers can actually include supplementary
information (addresses, TLVs) which need to be skipped to correctly handle the
header. Fixes Invalid TLV bug with haproxy 2.0.14 service checks.
More info here: https://github.com/haproxy/haproxy/issues/511
And here: https://www.mail-archive.com/haproxy@formilux.org/msg36890.html
Timo Sirainen [Tue, 16 Feb 2021 14:40:35 +0000 (16:40 +0200)]
lib: cpu-limit - Don't round current CPU usage up when checking if rlim_max is reached
The fatal error could trigger half a second too early.
Also always increase the provided cpu_limit_sec by 1 second to make sure it
won't trigger too early. Although even with this change it can still
trigger a few milliseconds too early for some reason.
Timo Sirainen [Tue, 10 Nov 2020 14:33:41 +0000 (16:33 +0200)]
lib-storage: Fix assert-crash when parsing binary attachments
EOF may not have been detected in the cur_block istream early enough,
causing the calculation to go wrong. This happened at least with empty
base64 bodies, but could have possibly happened in other situations also.
Markus Valentin [Mon, 1 Feb 2021 14:38:49 +0000 (15:38 +0100)]
acl: acl_lookup_dict_rebuild_update() - Commit transaction after each [un]set
When used with Cassandra an error can occur if multiple changes are
included into one transaction: "Multiple changes in transaction not
supported". Prevent these errors by committing every change on it's
own.
Nis Martensen [Sun, 24 May 2020 20:05:42 +0000 (22:05 +0200)]
systemd integration: notify service manager when ready
With Type=simple or Type=forking, systemd does not really know when the
service is ready to accept connections and might start depending
services too early. Use Type=notify to explicitly tell the service
manager when the service is ready.
For a real problem caused by assuming readiness too early, please see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951722
For the meaning of the service type and details of the readiness
protocol, see also the following links:
https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=
https://www.freedesktop.org/software/systemd/man/sd_notify.html
As discussed in the last link, more elaborate state notifications are
possible. This patch only implements the most basic part.
Original patch prepared by Michael Biebl, with slight modification.
dsync: Check namespace prefix when syncing shared namespaces
When iterating over namespaces, comparing namespace pointers doesn't
work for shared namespaces. Instead, check the prefix and include all
the mailboxes in the namespace for syncing.
If a view keeps being synced with MAIL_INDEX_VIEW_SYNC_FLAG_NOEXPUNGES,
every sync regenerated the missing log files and logged this error.
This could have resulted in lots of errors being logged about it, as
well as unnecessary CPU usage.
The view syncing was always syncing from the last "expunge log position",
even when expunges weren't being synced. The new behavior is to do that
only when expunges are synced, but otherwise use the "head log position"
to sync only the new changes since the last view sync.
The error is now logged once when the log is first noticed being lost.
Another error is logged when pending expunges are synced.
For now, we keep the read support to allow for a more gradual migration from
lzma/xz.
The code has bugs. Additionally, there is no benefit in keeping it around.
bzip2 or zstd (at maximum compression level) are likely better choices for
archival. For non-archival usecases, a light compression algorithm like
zstd (at low to medium compression level) or lz4 are better choices.
Timo Sirainen [Fri, 22 Jan 2021 11:19:05 +0000 (13:19 +0200)]
lib-master: test-event-stats - Fix unit test when compiling using build directory
When using build directory __FILE__ expands to
"../../../src/lib-master/test-event-stats.c", which doesn't match
"test-event-stats.c" what is normally used.
Paul Howarth [Mon, 4 Jan 2021 16:31:03 +0000 (16:31 +0000)]
lib: Fix timeval_cmp_margin for 32-bit systems
The test suite compares times with seconds values of -INT_MAX and
INT_MAX. The result of this comparison does not fit in a value of
type int and so the test suite fails on 32-bit systems where time_t
is an int. To fix this, calculations on seconds values are done
using long long integers.
Timo Sirainen [Tue, 26 Jan 2021 16:55:22 +0000 (18:55 +0200)]
dsync: Replace escape characters in outgoing mailbox names with alt_char
Especially when dsync is used for migration, we don't want to end up having
invalid mUTF7 mailbox names locally. Also, remote might not even be
configured to use the same escape character.