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

meta --remove does not delete the <typeId>.classname0 file from db/marshaller causing errors on subsequent type re-registration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.16
    • 2.17
    • general
    • None

    Description

      meta --remove command deletes the type from db/<binary-meta>/<node-id> but not from db/marshaller -
      This causes errors if the server tries to re-create the type w/the same name but different case.

      say the user created the type model.Account (upper case A)
      CREATE TABLE my_table(..) WITH key_type=model.Accountkey,value_type=model.Account
      then dropped the table, DROP TABLE my_table.
      and ran a --meta remove --typeName mode.Account

      If the users change the case of the type say from model.Account to model.account – one letter to lowercase
      and then does a subsequent:
      CREATE TABLE my_table(..) WITH key_type=model.accountkey,value_type=model.account

      then does an INSERT, the server will come back with “Failed to register class”

      Caused by: org.apache.ignite.internal.DuplicateTypeIdException: Duplicate ID [platformId=0, typeId=1853064544, oldCls=com.ual.cfa.fa.model.CFAFaPairNonFltDutyHistKey, newCls=com.ual.cfa.fa.model.CFAFaPairNonfltDutyHistKey]
      	at org.apache.ignite.internal.MarshallerContextImpl.registerClassName(MarshallerContextImpl.java:223) ~[ignite-core.jar]
      	at org.apache.ignite.internal.binary.BinaryContext.registerUserClassName(BinaryContext.java:1185) ~[ignite-core-.jar]
      

      Attachments

        Issue Links

          Activity

            People

              zstan Evgeny Stanilovsky
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 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