Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12479

All binary types are registered twice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9, 2.8.1
    • binary
    • None
    • Register binary types metadata only once per type.
    • Release Notes Required

    Description

      When a POJO is put into a cache, its binary type is registered twice during marshalling.

      Example:

      public class MetadataRegistrationExample {
          public static void main(String[] args) {
              Ignite ignite = Ignition.start("config/ignite.xml");
              Person p = new Person("Denis");
              ignite.getOrCreateCache("cache").put(1, p);
          }
      
          static class Person {
              private String name;
              public Person(String name) {
                  this.name = name;
              }
          }
      }
      

       

      Here is the generated debug log from the package

      [23:31:14,020][DEBUG][main][CacheObjectBinaryProcessorImpl] Requesting metadata update [typeId=-1210012928, typeName=binary.NestedObjectMarshallingExample$Person, changedSchemas=[], holder=null, fut=MetadataUpdateResultFuture [key=SyncKey [typeId=-1210012928, ver=0]]]
      [23:31:14,023][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Received MetadataUpdateProposedListener [typeId=-1210012928, typeName=binary.NestedObjectMarshallingExample$Person, pendingVer=0, acceptedVer=0, schemasCnt=0]
      [23:31:14,024][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Versions are stamped on coordinator [typeId=-1210012928, changedSchemas=[], pendingVer=1, acceptedVer=0]
      [23:31:14,024][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Updated metadata on originating node: [typeId=-1210012928, pendingVer=1, acceptedVer=0]
      [23:31:14,025][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Received MetadataUpdateAcceptedMessage MetadataUpdateAcceptedMessage [id=599e0a86c61-183a790b-7038-4dd5-b99d-89f1483e3635, typeId=-1210012928, acceptedVer=1, duplicated=false]
      [23:31:14,025][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Completing future MetadataUpdateResultFuture [key=SyncKey [typeId=-1210012928, ver=1]] for [typeId=-1210012928, pendingVer=1, acceptedVer=1]
      [23:31:14,026][DEBUG][main][CacheObjectBinaryProcessorImpl] Completed metadata update [typeId=-1210012928, typeName=binary.NestedObjectMarshallingExample$Person, waitTime=4ms, fut=MetadataUpdateResultFuture [key=SyncKey [typeId=-1210012928, ver=1]], tx=null]
      [23:31:14,027][DEBUG][main][CacheObjectBinaryProcessorImpl] Requesting metadata update [typeId=-1210012928, typeName=binary.NestedObjectMarshallingExample$Person, changedSchemas=[1975878747], holder=[typeId=-1210012928, pendingVer=1, acceptedVer=1], fut=MetadataUpdateResultFuture [key=SyncKey [typeId=-1210012928, ver=0]]]
      [23:31:14,027][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Received MetadataUpdateProposedListener [typeId=-1210012928, typeName=binary.NestedObjectMarshallingExample$Person, pendingVer=0, acceptedVer=0, schemasCnt=1]
      [23:31:14,028][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Versions are stamped on coordinator [typeId=-1210012928, changedSchemas=[1975878747], pendingVer=2, acceptedVer=1]
      [23:31:14,028][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Updated metadata on originating node: [typeId=-1210012928, pendingVer=2, acceptedVer=1]
      [23:31:14,028][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Received MetadataUpdateAcceptedMessage MetadataUpdateAcceptedMessage [id=d99e0a86c61-183a790b-7038-4dd5-b99d-89f1483e3635, typeId=-1210012928, acceptedVer=2, duplicated=false]
      [23:31:14,028][DEBUG][disco-notifier-worker-#41][CacheObjectBinaryProcessorImpl] Completing future MetadataUpdateResultFuture [key=SyncKey [typeId=-1210012928, ver=2]] for [typeId=-1210012928, pendingVer=2, acceptedVer=2]
      [23:31:14,029][DEBUG][main][CacheObjectBinaryProcessorImpl] Completed metadata update [typeId=-1210012928, typeName=binary.NestedObjectMarshallingExample$Person, waitTime=1ms, fut=MetadataUpdateResultFuture [key=SyncKey [typeId=-1210012928, ver=2]], tx=null]
      

      You can see, that a type is registered twice. First it's registered without any fields, and only the second time the type is registered properly.

      Attachments

        Issue Links

          Activity

            People

              dmekhanikov Denis Mekhanikov
              dmekhanikov Denis Mekhanikov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m