You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Karthik Palanisamy (Jira)" <ji...@apache.org> on 2020/03/02 18:16:00 UTC

[jira] [Updated] (HDFS-15201) SnapshotCounter hits MaxSnapshotID limit

     [ https://issues.apache.org/jira/browse/HDFS-15201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthik Palanisamy updated HDFS-15201:
--------------------------------------
    Description: 
Users reported that they are unable to take HDFS snapshots and their snapshotCounter hits MaxSnapshotID limit. MaxSnapshotID limit is 16777215.
{code:java}
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:java}
/**
 * This id is used to indicate the current state (vs. snapshots)
 */
public static final int CURRENT_STATE_ID = Integer.MAX_VALUE - 1;

{code}

  was:
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}


> 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
>            Priority: Major
>
> Users reported that they are unable to take HDFS snapshots and their snapshotCounter hits MaxSnapshotID limit. MaxSnapshotID limit is 16777215.
> {code:java}
> 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:java}
> /**
>  * 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-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org