You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Istvan Fajth (Jira)" <ji...@apache.org> on 2020/07/10 07:58:00 UTC

[jira] [Resolved] (HDDS-3912) Change SCM ContainerDB key to proto structure to support backward compatibility.

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

Istvan Fajth resolved HDDS-3912.
--------------------------------
    Resolution: Won't Fix

Hi [~Sammi], at the end of the day, we realized that this has to be fixed the other way around and track the work in HDDS-3924 and its sub-tasks.
HDDS-3925 needs a small discussion and a decision before implemented, PR should be ready soon after.

> Change SCM ContainerDB key to proto structure to support backward compatibility.
> --------------------------------------------------------------------------------
>
>                 Key: HDDS-3912
>                 URL: https://issues.apache.org/jira/browse/HDDS-3912
>             Project: Hadoop Distributed Data Store
>          Issue Type: Task
>            Reporter: Aravindan Vijayan
>            Assignee: Istvan Fajth
>            Priority: Major
>
> Currently, the 'key' type of the SCM container DB is org.apache.hadoop.hdds.scm.container.ContainerID which is not backed up by a proto equivalent. Hence, we use a long codec to serialize and deserialize the key from long to byte[ ] and back. 
> {code}
>   public static final DBColumnFamilyDefinition<ContainerID, ContainerInfo>
>       CONTAINERS =
>       new DBColumnFamilyDefinition<ContainerID, ContainerInfo>(
>           "containers",
>           ContainerID.class,
>           new ContainerIDCodec(),
>           ContainerInfo.class,
>           new ContainerInfoCodec());
> {code}
> In the future if we have to support a container id type that is more than just a long, then changing the ContainerID class will break backward compatibility. To handle this incompatibility in the future, we have to either migrate old data or provide fallback conversion codecs for the old data type. Hence, it is good to wrap this long into a proto structure. 
> cc [~nanda619]  / [~arp].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org