dannytbecker commented on code in PR #6018:
URL: https://github.com/apache/hadoop/pull/6018#discussion_r1319177733
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/BootstrapStandby.java:
##########
@@ -405,8 +423,14 @@ private boolean checkLogsAvailableForRead(FSImage image,
long imageTxId,
}
}
- private boolean checkLayoutVersion(NamespaceInfo nsInfo) throws IOException {
- return (nsInfo.getLayoutVersion() ==
HdfsServerConstants.NAMENODE_LAYOUT_VERSION);
+ private boolean checkLayoutVersion(NamespaceInfo nsInfo, boolean
isRollingUpgrade) {
+ if (isRollingUpgrade) {
+ // During a rolling upgrade the service layout versions may be different,
+ // but we should check that the layout version being sent is compatible
+ return nsInfo.getLayoutVersion() <=
+ HdfsServerConstants.MINIMUM_COMPATIBLE_NAMENODE_LAYOUT_VERSION;
Review Comment:
The version numbers are negative so the
`HdfsServerConstants.MINIMUM_COMPATIBLE_NAMENODE_LAYOUT_VERSION` is -61. We
want the nsInfo's layout version to be a "higher" version than the minimum
which is -61. So we need to use `<=` because a "higher" version is a lower
negative like -67.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]