Description
Users reported that they are unable to take HDFS snapshots and their snapshotCounter hits MaxSnapshotID limit. MaxSnapshotID limit is 16777215.
SnapshotManager.java private static final int SNAPSHOT_ID_BIT_WIDTH = 24; /** * Returns the maximum allowable snapshot ID based on the bit width of the * snapshot ID. * * @return maximum allowable snapshot ID. */ public int getMaxSnapshotID() { return ((1 << SNAPSHOT_ID_BIT_WIDTH) - 1); }
I think, SNAPSHOT_ID_BIT_WIDTH is too low. May be good idea to increase SNAPSHOT_ID_BIT_WIDTH to 31? to aline with our CURRENT_STATE_ID limit (Integer.MAX_VALUE - 1).
/** * This id is used to indicate the current state (vs. snapshots) */ public static final int CURRENT_STATE_ID = Integer.MAX_VALUE - 1;
Attachments
Issue Links
- is duplicated by
-
HDFS-14548 Cannot create snapshot when the snapshotCounter reaches MaxSnapshotID
- Resolved
- links to