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

Fix PagingState deserialization when the state was serialized using protocol version different from current session's

    XMLWordPrintableJSON

Details

    • Availability - Response Crash
    • Normal
    • Normal
    • Unit Test
    • All
    • None
    • Hide

      Expanded unit test coverage

      Show
      Expanded unit test coverage

    Description

      3.0 and native protocol V4 introduced a change to how PagingState is serialized. Unfortunately that can break requests during upgrades: since paging states are opaque, it's possible for a client to receive a paging state encoded as V3 on a 2.1 node, and then send it to a 3.0 node on a V4 session. The version of the current session will be used to deserialize the paging state, instead of the actual version used to serialize it, and the request will fail.

      This is obviously sub-optimal, but also avoidable. This JIRA fixes one half of the problem: 3.0 failing to deserialize 'mislabeled' paging states. We can do this by inspecting the byte buffer to verify if it's been indeed serialized with the protocol version used by the session, and if not, use the other method of deserialization.

      It should be noted that we list this as a 'known limitation' somewhere, but really this is an upgrade-blocking bug for some users of C*.

      Attachments

        Activity

          People

            aleksey Aleksey Yeschenko
            aleksey Aleksey Yeschenko
            Aleksey Yeschenko
            Blake Eggleston, Sam Tunnicliffe
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: