Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13866

Clock-dependent integer overflow in tests CellTest and RowsTest

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Fix Version/s: 3.0.15, 3.11.1, 4.0
    • Component/s: Testing
    • Labels:
      None

      Description

      These tests create timestamps from Unix time, but this is done as int math with the result stored in a long. This means that if the test is run at certain times, like 1505177731, corresponding to Tuesday, September 12, 2017, 12:55:31, the test can have two timestamps separated by a single second that reverse their ordering when multiplied by 1000000, such as 1505177731 -> 2147149504 and 1505177732 -> -2146817792. This causes a variety of test failures, since it changes the reconciliation order of these cells.

      Note that I've tagged this as trivial because the problem is in the manual construction of timestamps in the test; I know of nowhere that we make this mistake with real data.

        Issue Links

          Activity

          Hide
          jkni Joel Knighton added a comment -

          Trivial patches for 3.0, 3.11, and trunk. The 3.0 patch merges forward cleanly.

          Show
          jkni Joel Knighton added a comment - Trivial patches for 3.0 , 3.11 , and trunk . The 3.0 patch merges forward cleanly.
          Hide
          jjirsa Jeff Jirsa added a comment -

          lgtm.

          Show
          jjirsa Jeff Jirsa added a comment - lgtm.
          Hide
          jkni Joel Knighton added a comment -

          Thanks! Committed to 3.0 branch as d79fc9a2258d10e8a54fd4136d5544e10ad3ddda and merged forward.

          Show
          jkni Joel Knighton added a comment - Thanks! Committed to 3.0 branch as d79fc9a2258d10e8a54fd4136d5544e10ad3ddda and merged forward.

            People

            • Assignee:
              jkni Joel Knighton
              Reporter:
              jkni Joel Knighton
              Reviewer:
              Jeff Jirsa
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development