lowka commented on code in PR #5373: URL: https://github.com/apache/ignite-3/pull/5373#discussion_r1993490362
########## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogStorageProfilesDescriptorSerializers.java: ########## @@ -55,11 +56,34 @@ public CatalogStorageProfilesDescriptor readFrom(IgniteDataInput input) throws I } @Override - public void writeTo(CatalogStorageProfilesDescriptor descriptor, IgniteDataOutput output) throws IOException { + public void writeTo(CatalogStorageProfilesDescriptor descriptor, CatalogObjectDataOutput output) throws IOException { CatalogObjectSerializer<CatalogStorageProfileDescriptor> profileSerializer = serializers.get(1, MarshallableEntryType.DESCRIPTOR_STORAGE_PROFILE.id()); writeList(descriptor.profiles(), profileSerializer, output); } } + + /** + * Serializer for {@link CatalogStorageProfilesDescriptor}. + */ + @CatalogSerializer(version = 2, since = "3.1.0") + static class StorageProfilesDescriptorSerializerV2 implements CatalogObjectSerializer<CatalogStorageProfilesDescriptor> { + + private final MarshallableType<CatalogStorageProfileDescriptor> profileType = + MarshallableType.typeOf(CatalogStorageProfileDescriptor.class, + MarshallableEntryType.DESCRIPTOR_STORAGE_PROFILE, 2); + + @Override + public CatalogStorageProfilesDescriptor readFrom(CatalogObjectDataInput input) throws IOException { + List<CatalogStorageProfileDescriptor> storageProfileDescriptors = input.readEntryList(profileType); + + return new CatalogStorageProfilesDescriptor(storageProfileDescriptors); + } + + @Override + public void writeTo(CatalogStorageProfilesDescriptor descriptor, CatalogObjectDataOutput output) throws IOException { + output.writeEntryList(profileType, descriptor.profiles()); Review Comment: Thanks. Fixed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org