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

AsyncWriter of FSHLog might throw ArrayIndexOutOfBoundsException

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.98.2
    • 0.98.3
    • wal
    • None

    Description

      AsyncWriter of FSHLog might throw ArrayIndexOutOfBoundsException because of the following code in AsyncWriter#run():

                   }
                 }
                 if (!hasIdleSyncer) {
                  int idx = (int)this.lastWrittenTxid % asyncSyncers.length;
                   asyncSyncers[idx].setWrittenTxid(this.lastWrittenTxid);
                 }
               }
      

      In obove code, "this.lastWrittenTxid % asyncSyncers.length" might become negative when this.lastWrittenTxid is bigger than Interger.MAX_VALUE where this.lastWrittenTxid is a long. The attachment gives a quick fix.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cuijianwei Jianwei Cui Assign to me
            cuijianwei Jianwei Cui
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment