]> git.ipfire.org Git - thirdparty/chrony.git/commit
sources: replace unreachable sources before selection
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 28 Aug 2024 08:49:52 +0000 (10:49 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 29 Aug 2024 07:37:42 +0000 (09:37 +0200)
commit78b9c13a11b63348a2060b8f3b55662b3ec2c814
treed131525322afe96281c93539631a948440657b59
parent1ab5b88939ba53f592ba4aa7251cc91e032cd32a
sources: replace unreachable sources before selection

The commit c43efccf0273 ("sources: update source selection with
unreachable sources") caused a high rate of failures in the
148-replacement test (1 falseticker vs 2 unreachable sources). This was
due to a larger fraction of the replacement attempts being made for the
source incorrectly marked as a falseticker instead of the second
unreachable source and the random process needed more time to get to the
expected state with both unreachable sources replaced.

When updating reachability of an unreachable source, try to request the
replacement of the source before calling the source selection, where
other sources may be replaced, to better balance the different
replacement attempts.
sources.c
test/simulation/148-replacement