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

SnapshotFileCache will always refresh the file cache

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.1, 0.98.23, 2.0.0
    • Fix Version/s: 1.4.0, 2.0.0
    • Component/s: snapshots
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In SnapshotFileCache#refreshCache, the hasChanges will be judged as:

          try {
            FileStatus dirStatus = fs.getFileStatus(snapshotDir);
            lastTimestamp = dirStatus.getModificationTime();
            hasChanges |= (lastTimestamp >= lastModifiedTime); // >= will make hasChanges always be true
      

      The (lastTimestamp >= lastModifiedTime) will make hasChanges always be true because lastTimestamp will be updated as:

      this.lastModifiedTime = lastTimestamp;
      

      So, SnapshotFileCache will always refresh the file cache.

        Attachments

        1. HBASE-17330-v2.patch
          3 kB
          Jianwei Cui
        2. HBASE-17330-v1.patch
          2 kB
          Jianwei Cui

          Activity

            People

            • Assignee:
              cuijianwei Jianwei Cui
              Reporter:
              cuijianwei Jianwei Cui
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: