You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Karthik Palanisamy (Jira)" <ji...@apache.org> on 2020/03/02 18:16:00 UTC
[jira] [Created] (HDFS-15201) SnapshotCounter hits MaxSnapshotID
limit
Karthik Palanisamy created HDFS-15201:
-----------------------------------------
Summary: SnapshotCounter hits MaxSnapshotID limit
Key: HDFS-15201
URL: https://issues.apache.org/jira/browse/HDFS-15201
Project: Hadoop HDFS
Issue Type: Bug
Components: snapshots
Reporter: Karthik Palanisamy
Assignee: Karthik Palanisamy
Users reported that they are unable to take take HDFS snapshots and their snapshotCounter hits MaxSnapshotID limit. MaxSnapshotID limit is 16777215.
{code}
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);
}
{code}
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).
{code}
/**
* This id is used to indicate the current state (vs. snapshots)
*/
public static final int CURRENT_STATE_ID = Integer.MAX_VALUE - 1;
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org