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

Optimize service deployment assignments object

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.0
    • None
    • managed services

    Description

      1) The deployment assignment is stored using a map [node ID -> number of assigned services]. However, this assignment is not very effective for cases when service configuration is (maxPerCluster = 0, maxPerNode > 0), because in this case, we can avoid assignment recalculation at all. The assignment for this case may look like (eachNode=N). In this case, the assignment does not change and we can effectively skip it during the reassign loop.

      2) We store zero assignment counters, which does not make sense at all - if there are no service deployments for a node, there should be no corresponding entry in the map at all. The size of assignments for (maxPerCluster > 0) configurations is O(number of nodes in the cluster), but it should be O(maxPerCluster).

      3) If an assignment did not change, we should not commit the assignment transaction - this is redundant

      4) Perhaps, it also makes sense to calculate several assignments at once and do a putAll commit instead of single puts - this should also decrease the assignment calculation latency

      Attachments

        Issue Links

          Activity

            People

              kukushal Alexey Kukushkin
              agoncharuk Alexey Goncharuk
              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