Make OverlappingTasksWithSameTimestampOneWaitsForOther less racy

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • Fully Compatible
    • ClusterScalability 3Aug-17Aug
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The test is racy, a sleep added right before this line will make it consistenly fail.

      There are a few reasons for this:
      1. The drain queries doesn't immediately make the secondFuture ready. So even it will eventually complete, if the test checks the future right away, it can mistakenly pass the !ready assertion. This is why test is passing most of the time.
      2. The ordering in the real range deleter and the test expects is the opposite.
      3. The waiting for active queries actually happens before the overlap check. So if the first task passed the overlap check before the second task is queued, it can invalidate the test.

      For #2, I personally think that the ordering in the test is more conistent and the ordering in the real range deleter is a typo.
      For #3, maybe we can make the task state as pending so it won't execute right away, allowing the tests to queue the 2nd task and properly exercise the overlap logic.

            Assignee:
            Wenqin Ye
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: