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

Re-registering a schema should not resolve other schemas

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.4.1.Final
    • None
    • False
    • False

      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.

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

              Created:
              Updated: