hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jianwei Cui (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-17330) SnapshotFileCache will always refresh the file cache
Date Sun, 18 Dec 2016 05:03:58 GMT

     [ https://issues.apache.org/jira/browse/HBASE-17330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jianwei Cui updated HBASE-17330:
--------------------------------
    Attachment: HBASE-17330-v2.patch

> SnapshotFileCache will always refresh the file cache
> ----------------------------------------------------
>
>                 Key: HBASE-17330
>                 URL: https://issues.apache.org/jira/browse/HBASE-17330
>             Project: HBase
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 2.0.0, 1.3.1, 0.98.23
>            Reporter: Jianwei Cui
>            Priority: Minor
>         Attachments: HBASE-17330-v1.patch, HBASE-17330-v2.patch
>
>
> In {{SnapshotFileCache#refreshCache}}, the {{hasChanges}} will be judged as:
> {code}
>     try {
>       FileStatus dirStatus = fs.getFileStatus(snapshotDir);
>       lastTimestamp = dirStatus.getModificationTime();
>       hasChanges |= (lastTimestamp >= lastModifiedTime); // >= will make hasChanges
always be true
> {code}
> The  {{(lastTimestamp >= lastModifiedTime)}} will make {{hasChanges}} always be true
because {{lastTimestamp}} will be updated as:
> {code}
> this.lastModifiedTime = lastTimestamp;
> {code}
> So, SnapshotFileCache will always refresh the file cache.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message