Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3136

Relocation of Avatica classes breaks compatibilty between older version of thin-client/PQS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.8.0
    • Labels:
      None

      Description

      It was recently brought to my attention by Holman Lan that the shading change will break all previous versions of the thin client from working with the newer PQS (and vice versa).

      Avatica uses the full class name in the message to identify what protobuf message to use to deserialize the bytes from the wire. As such, an older thin client would be expecting these protobuf classes to look like org.apache.calcite.avatica.proto.Responses$PrepareResponse. However after PHOENIX-2535, PQS would be sending back org.apache.phoenix.shaded.org.apache.calcite.avatica.proto.Responses$PrepareResponse. Both are trying to refer to the same Java class, but we can't disambiguate presently.

      Long term, I think the protocol itself will have to be updated in Avatica to be a little less brittle in this regard (I did not originally consider the implications that client/server might have the classes, but with a different name than what we had in Avatica).

      Short term, we can undo the relocation of the Avatica classes in the thin-client and queryserver artifacts. I will be working on this post-haste.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elserj Josh Elser
                Reporter:
                elserj Josh Elser
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: