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

Update partition pending/planned assignments on rebalance triggers

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Done
    • None
    • 3.0.0-alpha5
    • None

    Description

      According to an algorithm from https://issues.apache.org/jira/browse/IGNITE-16020, we need to support partition assignments updates when:

      • baseline changed
      • number of partition replicas changed

      This update needs metastore multi-invoke feature and can be described as:

      onBaselineEvent:
          for table in tableCfg.tables():
              for partition in table.partitions:
                  <inline metastoreInvoke>
                  
      onReplicaNumberChange:
          with table as event.table:
              for partitoin in table.partitions:
                  <inline metastoreInvoke>
      
      metastoreInvoke: // atomic metastore call through multi-invoke api
          if empty(partition.change.trigger.revision) || partition.change.trigger.revision < event.revision:
              if empty(partition.assignments.pending) && partition.assignments.stable != calcPartAssighments():
                  partition.assignments.pending = calcPartAssignments() 
                  partition.change.trigger.revision = event.revision
              else:
                  if partition.assignments.pending != calcPartAssignments
                      partition.assignments.planned = calcPartAssignments()
                      partition.change.trigger.revision = event.revision
                  else
                      remove(partition.assignments.planned)
          else:
              skip
      

      (Phase 1)

      Attachments

        Issue Links

          Activity

            People

              maliev Mirza Aliev
              kgusakov Kirill Gusakov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: