Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16007

Deserialization of ReplicaState should avoid throwing ArrayIndexOutOfBoundsException

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.1, 3.4.0
    • Component/s: None

      Description

      ReplicaState enum is using ordinal to conduct serialization and deserialization, which is vulnerable to the order, to cause issues similar to HDFS-15624.

      To avoid it, either adding comments to let later developer not to change this enum, or add index checking in the read and getState function to avoid index out of bound error.

        Attachments

          Activity

            People

            • Assignee:
              vjasani Viraj Jasani
              Reporter:
              jwjwyoung junwen yang

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h

                  Issue deployment