Pavel Pereslegin created IGNITE-24564:
-----------------------------------------

             Summary: Sql. Prepare catalog serializers to move to new protocol 
version
                 Key: IGNITE-24564
                 URL: https://issues.apache.org/jira/browse/IGNITE-24564
             Project: Ignite
          Issue Type: Improvement
          Components: sql
            Reporter: Pavel Pereslegin


Full description of the new protocol 
https://github.com/ggprivate/gridgain-9/pull/1790/files?short_path=b620061#diff-b6200614bc71e194a446cad5d275138fedf1e1f4ffde59b5be17e2fc8c93fc54

In order to migrate to the new serialization protocol.

1. Need to introduce annotation class

{code:java}
@Target(ElementType.TYPE)
@Retention(RUNTIME)
public @interface CatalogSerializer {
    /**
     * Returns serializer version.
     */
    short version();

    /**
     * Returns the type of the object being serialized.
     */
    MarshallableEntryType type();

    /**
     * The product version starting from which the serializer is used.
     */
    String since();
}
{code}

2. Annotate all existing serializers with @CatalogSerializer(version=1, 
since="3.0.0", type=<type>​)

3. Move all existing serializers to separate package (this will required make 
missing methods to access private fields of descriptors).

4. Implement serializer registry building.

interface CatalogEntrySerializerProvider {
    // New method is used to obtain serializer of specific version.
    CatalogObjectSerializer<MarshallableEntry> get(int version, int typeId);

    // Used to obtain the newest serializer version.
    int activeSerializerVersion(int typeId);
}

During initialization registry must scan serializer folder and build registry 
of available serializers.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to