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

VolumeScanner scan cursor not save periodic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.6.0
    • None
    • hdfs
    • None
    • cdh5.4.0

    Description

      The bug introduce from HDFS-7430 , the time is not same, one is monotonicMs and other is clock time. It should use Time.now() both

      VolumeScanner.java

              long saveDelta = monotonicMs - curBlockIter.getLastSavedMs();
              if (saveDelta >= conf.cursorSaveMs) {
                LOG.debug("{}: saving block iterator {} after {} ms.",
                        this, curBlockIter, saveDelta);
                saveBlockIterator(curBlockIter);
              }
      

      curBlockIter.getLastSavedMs() init here

      FsVolumeImpl.java

          BlockIteratorState() {
            lastSavedMs = iterStartMs = Time.now();
            curFinalizedDir = null;
            curFinalizedSubDir = null;
            curEntry = null;
            atEnd = false;
          }
      

      Attachments

        1. HDFS-12209.002.patch
          4 kB
          fatkun
        2. HDFS-12209.patch
          1 kB
          fatkun

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fatkun fatkun
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: