karthikhw commented on a change in pull request #1870: HDFS-15201
SnapshotCounter hits MaxSnapshotID limit
URL: https://github.com/apache/hadoop/pull/1870#discussion_r387906221
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java
##########
@@ -541,8 +541,8 @@ public void clearSnapshottableDirs() {
*
* @return maximum allowable snapshot ID.
*/
- public int getMaxSnapshotID() {
- return ((1 << SNAPSHOT_ID_BIT_WIDTH) - 1);
+ public int getMaxSnapshotID() {
+ return (1 << SNAPSHOT_ID_BIT_WIDTH);
Review comment:
Thank you @mukul1987. I didn't understand this "as we would only have one
snapshot id here".
SNAPSHOT_ID_BIT_WIDTH has no relation with anyone. Not sure why would we
need index -1.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]