dnsdist on s390x: check shard->respRing.size() > entriesPerShard * 0.95 has failed #6430
Labels
Milestone
Comments
It means that the shard distribution was not really uniform, probably because the contention was a lot worse than expected. I'll turn that into a warning since it only matters when the corresponding code has been altered. |
i'll be testing this on the buildds: diff --git a/pdns/dnsdistdist/test-dnsdistrings_cc.cc b/pdns/dnsdistdist/test-dnsdistrings_cc.cc
index c98016c72..8e76e0836 100644
--- a/pdns/dnsdistdist/test-dnsdistrings_cc.cc
+++ b/pdns/dnsdistdist/test-dnsdistrings_cc.cc
@@ -230,7 +230,10 @@ BOOST_AUTO_TEST_CASE(test_Rings_Threaded) {
size_t totalResponses = 0;
for (const auto& shard : rings.d_shards) {
BOOST_CHECK_LE(shard->queryRing.size(), entriesPerShard);
- BOOST_CHECK_GT(shard->queryRing.size(), entriesPerShard * 0.95);
+ // verify that the shard is not empty
+ BOOST_CHECK_GT(shard->queryRing.size(), (entriesPerShard * 0.5) + 1);
+ // this would be optimal
+ BOOST_WARN_GT(shard->queryRing.size(), entriesPerShard * 0.95);
totalQueries += shard->queryRing.size();
for (const auto& entry : shard->queryRing) {
BOOST_CHECK_EQUAL(entry.name, qname);
@@ -240,7 +243,10 @@ BOOST_AUTO_TEST_CASE(test_Rings_Threaded) {
BOOST_CHECK_EQUAL(entry.requestor.toStringWithPort(), requestor.toStringWithPort());
}
BOOST_CHECK_LE(shard->respRing.size(), entriesPerShard);
- BOOST_CHECK_GT(shard->respRing.size(), entriesPerShard * 0.95);
+ // verify that the shard is not empty
+ BOOST_CHECK_GT(shard->queryRing.size(), (entriesPerShard * 0.5) + 1);
+ // this would be optimal
+ BOOST_WARN_GT(shard->respRing.size(), entriesPerShard * 0.95);
totalResponses += shard->respRing.size();
for (const auto& entry : shard->respRing) {
BOOST_CHECK_EQUAL(entry.name, qname); |
Needs more on s390x, current diff: Not sure why this is only a problem on s390x. |
I just saw it happen in Travis. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Debian s390x, the tests fail with:
Havent looked myself what this means yet.
The text was updated successfully, but these errors were encountered: