• Luis Soares's avatar
    BUG#40143 federated.federated_server fails sporadically in pushbuild · 9453c4f0
    Luis Soares authored
    The original goal of the test, as reported on BUG #25721, is to check whether 
    a deadlock happens or not when concurrently CREATING/ALTERING/DROPPING the 
    same server. For that a procedure (p1) is created that runs the exact same 
    CREATE/ALTER/DROP statements for 10K iterations and two different connections 
    (threads - t1 and t2) call p1 concurrently. At the end of the 10K iterations, 
    the test checks if there was errors while running the loop (SELECT e >0).
          
    The problem is that In some cases it may happen that one thread, t1, gets 
    scheduled to execute with just enough time to complete the iteration and 
    never bumps into the other thread t2. Meaning that t1 will never run into an 
    SQL exception. On the other hand, the other thread, t2, may run into t1 and 
    never issue any/part of its own statements because it will throw an SQLEXCEPTION. 
    This is probably the case for failures where only one value differs.
          
    Furthermore, there is a third scenario: both threads are scheduled to run 
    interleaved for each iteration (or even one thread completes all iterations 
    before the other starts). In this case, both will succeed without any error. 
    This is probably the case for the failure that reports two different values.
          
    This patch addresses the failure in pushbuild by removing the error counting 
    and the printout (SELECT > 0) at the end of the test. A timeout should occur 
    if the error that the test is checking surfaces.
    9453c4f0
federated_server.result 8.33 KB