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

Multiple client leave/join events may wipe affinity assignment history and cause transactions fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8
    • None
    • None
    • Docs Required

    Description

      We keep history of GridAffinityAssignmentCache#MAX_HIST_SIZE affinity assignments. However, flood of client joins/leaves may wipe it out entirely and cause fail/hang of transaction that was started before the flood due to the following exception:

                  if (cache == null || cache.topologyVersion().compareTo(topVer) > 0) {
                      throw new IllegalStateException("Getting affinity for topology version earlier than affinity is " +
                          "calculated [locNode=" + ctx.discovery().localNode() +
                          ", grp=" + cacheOrGrpName +
                          ", topVer=" + topVer +
                          ", head=" + head.get().topologyVersion() +
                          ", history=" + affCache.keySet() +
                          ']');
                  }
      

      History is limited in order to prevent JVM heap overflow. At the same time, only "server event" affinity assignments are heavy: "client event" assignments are just shallow copies of "server event" assignments.
      I suggest to limit history by the number of "server event" assignments.
      Also, considering the provided fix, I don't see any need to keep 500 items in history. I propose to change history size to 50.

      Attachments

        Issue Links

          Activity

            People

              ivan.glukos Ivan Rakov
              ivan.glukos Ivan Rakov
              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