[
https://issues.apache.org/jira/browse/HDFS-17164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757070#comment-17757070
]
ASF GitHub Bot commented on HDFS-17164:
---------------------------------------
umamaheswararao commented on code in PR #5974:
URL: https://github.com/apache/hadoop/pull/5974#discussion_r1300559021
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplica.java:
##########
@@ -367,12 +367,23 @@ public void setPinning(LocalFileSystem localFS) throws
IOException {
}
@Override
- public void bumpReplicaGS(long newGS) throws IOException {
+ public void bumpReplicaGS(long newGS, String trashDir) throws IOException {
long oldGS = getGenerationStamp();
final File oldmeta = getMetaFile();
setGenerationStamp(newGS);
final File newmeta = getMetaFile();
+ if (trashDir != null) {
Review Comment:
Where are we copying back these files after rollback?
Every time append after upgrade we do copy? isn't it only first time append
or genstampbump needs copy? Rest will not be tracked in prior fsimage anyway.
> During rolling upgrade, datanode should copy-on-append when bumpReplicaGS
> -------------------------------------------------------------------------
>
> Key: HDFS-17164
> URL: https://issues.apache.org/jira/browse/HDFS-17164
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode, rolling upgrades
> Reporter: Tsz-wo Sze
> Assignee: Tsz-wo Sze
> Priority: Major
> Labels: pull-request-available
>
> During rolling upgrade, datanode create a trash directory for each block
> pool. Then a block deletion becomes moving the block to trash.
> For bumpReplicaGS, it will rename the meta file and then continue writing to
> the block file. It should copy the original block file and the original meta
> file to trash in order to support rollback.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]