Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-25340

Protobuf Mesage Incompatibility Detector

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.3, 2.2.6
    • None
    • None
    • None

    Description

      Regarding the issue HBASE-25238. caused by the incompatibility of protobuf message, we have created a static checker which keeps track of the proto file change, and detect potential incompatibility:

      1. Add/delete required field, which is exactly the case reported in HBASE-25238.
      2. The tag number of a field has been changed, as described in HDFS-9788. Also, the protobuf guidelines suggests each field in the message definition has a unique number. These numbers are used to identify your fields in the message binary format, and should not be changed once your message type is in use
      3. A  required field has been changed to optional, or an optional field has been changed to required. According to the guidelines in protobuf official websiteRequired Is Forever You should be very careful about marking fields as required. If at some point you wish to stop writing or sending a required field, it will be problematic to change the field to an optional field - old readers will consider messages without this field to be incomplete and may reject or drop them unintentionally. You should consider writing application-specific custom validation routines for your buffers instead.

      We have applied our checker on the frequently maintained HBASE versions: rel/1.4.3, rel/1.6.0, rel/2.2.6, rel/2.3.3, and master, and we found 37 potential problems as attached, which includes the one found in HBASE-25238

       

      Attachments

        1. protoCompatibility.txt
          5 kB
          junwen yang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jwjwyoung junwen yang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: