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

LWTs keep failing in trunk after immutable refactor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 4.0, 4.0-alpha1
    • Labels:
    • Environment:

      OpenJDK Runtime Environment (build 1.8.0_161-b14), Cassandra 4.0 commit c22ee2bd451d030e99cfb65be839bbc735a5352f (29.3.2018 14:01)

    • Severity:
      Normal

      Description

      In the PaxosState, the original assert check is in the form of:

      assert promised.update.metadata() == accepted.update.metadata() && accepted.update.metadata() == mostRecentCommit.update.metadata();

      However, after the change to make TableMetadata immutable this no longer works as these instances are not necessarily the same (or never). This causes the LWTs to fail although they're still correctly targetting the same table.

      From IRC:

      <pcmanus> It's a bug alright. Though really, the assertion should be on the metadata ids, cause TableMetadata#equals does more than what we want.
      <pcmanus> That is, replacing by .equals() is not ok. That would reject throw on any change to a table metadata, while the spirit of the assumption was to sanity check both update were on the same table.

        Attachments

        1. CASSANDRA-14356.diff
          2 kB
          Michael Burman

          Activity

            People

            • Assignee:
              burmanm Michael Burman
              Reporter:
              burmanm Michael Burman
              Authors:
              Michael Burman
              Reviewers:
              Michael Semb Wever
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: