Uploaded image for project: 'Infinispan ProtoStream'
  1. Infinispan ProtoStream
  2. IPROTO-223

Re-registering a schema should not resolve other schemas

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 4.4.1.Final
    • None
    • None

    Description

      When an infinispan user adds a new proto schema to the proto metadata cache, SerializationContextRegistryImpl.MarshallerContext.update() re-registers all the schemas and marshallers.

      If one of the already-registered schemas is invalid (e.g. because its dependencies are going to be registered later), the re-registration of common-types-java.proto fails:

      org.infinispan.protostream.DescriptorParserException: Import 'B.proto' not found
      	at org.infinispan.protostream.descriptors.FileDescriptor.resolveImports(FileDescriptor.java:291)
      	at org.infinispan.protostream.descriptors.FileDescriptor.resolveDependencies(FileDescriptor.java:229)
      	at org.infinispan.protostream.descriptors.FileDescriptor.resolveDependencies(FileDescriptor.java:210)
      	at org.infinispan.protostream.descriptors.ResolutionContext.resolve(ResolutionContext.java:57)
      	at org.infinispan.protostream.impl.SerializationContextImpl.registerProtoFiles(SerializationContextImpl.java:127)
      	at org.infinispan.protostream.types.java.CommonTypesSchema.registerSchema(CommonTypesSchema.java:49)
      

      The immediate source of the problem is that CommonTypesSchema.registerSchema() creates a new FileDescriptorSource instance, which doesn't have a ProgressCallback. On the other end of the problem, I don't think adding a new schema in a SerializationContextImpl should re-register the existing schemas.

      But I also believe that registering a schema should not automatically try to resolve all the other schemas, resolving the schemas should be a separate step at the end of the SerializationContextRegistryImpl update.

      Attachments

        Issue Links

          Activity

            People

              anistor Adrian Nistor
              dberinde@redhat.com Dan Berindei
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: