Property: fix intermittent test failure.
authorPauli <paul.dale@oracle.com>
Fri, 22 Nov 2019 22:04:38 +0000 (08:04 +1000)
committerPauli <paul.dale@oracle.com>
Sun, 24 Nov 2019 11:54:34 +0000 (21:54 +1000)
The reduction in the cache flush threshold in #10408 caused the stochastic test
to fail with noticeable probability.  Revert that part of the change.

Also add a comment to help avoid this in future.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10505)

crypto/property/property.c

index 20d1a758560d56f37d0f0022da91c23e7e38322e..33e7469351e21fd07af2105f3e12a3fb18297872 100644 (file)
 #include "crypto/sparse_array.h"
 #include "property_local.h"
 
-/* The number of elements in the query cache before we initiate a flush */
-#define IMPL_CACHE_FLUSH_THRESHOLD  50
+/*
+ * The number of elements in the query cache before we initiate a flush.
+ * If reducing this, also ensure the stochastic test in test/property_test.c
+ * isn't likely to fail.
+ */
+#define IMPL_CACHE_FLUSH_THRESHOLD  500
 
 typedef struct {
     void *method;