Hello Dean,

Or, (3) remove this test?  I am not quite sure what there is to gain
with this extra test considering all the other tests with permute()
already present in this script.

Yes, I think removing the test is the best option. It was originally
added because there was a separate code path for larger permutation
sizes that needed testing, but that's no longer the case so the test
really isn't adding anything.

Hmmm…

It is the one test which worked in actually detecting an issue, so I would not say that it is not adding anything, on the contrary, it did prove its value! The permute function is expected to be deterministic on different platforms and architectures, and it is not.

I agree that removing the test will hide the issue effectively:-) but ISTM more appropriate to solve the underlying issue and keep the test.

I'd agree with a two phases approach: drop the test in the short term and deal with the PRNG later. I'm sooooo unhappy with this 48 bit PRNG that I may be motivated enough to attempt to replace it, or at least add a better (faster?? larger state?? same/better quality?) alternative.

Attached patch disactivates the test with comments to outline that there is an issue to fix… so it is *not* removed.

I'm obviously okay with providing an alternate PRNG, let me know if this is the prefered option.

--
Fabien.
diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl
index 2eaf9ab4c2..db65988f76 100644
--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -645,13 +645,15 @@ SELECT :v0, :v1, :v2, :v3;
              permute(0, 2, 5435) = 1 and permute(1, 2, 5435) = 0)
 -- 63 bits tests
 \set size debug(:max - 10)
-\set t debug(permute(:size-1, :size, 5432) = 5301702756001087507 and \
-             permute(:size-2, :size, 5432) = 8968485976055840695 and \
-             permute(:size-3, :size, 5432) = 6708495591295582115 and \
-             permute(:size-4, :size, 5432) = 2801794404574855121 and \
-             permute(:size-5, :size, 5432) = 1489011409218895840 and \
-             permute(:size-6, :size, 5432) = 2267749475878240183 and \
-             permute(:size-7, :size, 5432) = 1300324176838786780)
+-- FIXME non deterministic issue on i386 due to floating point different behavior
+\set t debug(true)
+-- \set t debug(permute(:size-1, :size, 5432) = 5301702756001087507 and \
+--              permute(:size-2, :size, 5432) = 8968485976055840695 and \
+--              permute(:size-3, :size, 5432) = 6708495591295582115 and \
+--              permute(:size-4, :size, 5432) = 2801794404574855121 and \
+--              permute(:size-5, :size, 5432) = 1489011409218895840 and \
+--              permute(:size-6, :size, 5432) = 2267749475878240183 and \
+--              permute(:size-7, :size, 5432) = 1300324176838786780)
 }
 	});
 

Reply via email to