[
https://issues.apache.org/jira/browse/HDFS-17164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757094#comment-17757094
]
ASF GitHub Bot commented on HDFS-17164:
---------------------------------------
umamaheswararao commented on code in PR #5974:
URL: https://github.com/apache/hadoop/pull/5974#discussion_r1300632520
##########
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:
One potential issue could be that if we do multiple appends on same blocks,
we need to check the he behavior of this copy and rollback. I am curious to
understand little more details on these cases how do we handle.
> 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]