Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2210

ShuffleGrouping does not produce even distribution

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 2.0.0, 1.1.0, 1.0.3
    • Component/s: storm-core
    • Labels:
      None

      Description

      When testing the ShuffleGrouping in a multithreaded environment, it produces an extremely uneven distribution.

      This appears to be a result of the Collection.shuffle call here. https://github.com/apache/storm/blob/1.0.x-branch/storm-core/src/jvm/org/apache/storm/grouping/ShuffleGrouping.java#L58

      Because current was set to zero before the shuffle, other threads are able to access the arrayList while it is being shuffled.

      Stephen's gist here includes a test that results in a very uneven distribution of taskIds from the ShuffleGrouping: https://gist.github.com/Crim/61537958df65a5e13b3844b2d5e28cde

      I would have expected the taskIds from the ShuffleGrouping to be almost uniformly distributed.

        Attachments

          Activity

            People

            • Assignee:
              kevpeek Kevin Peek
              Reporter:
              kevpeek Kevin Peek
            • Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 3.5h
                3.5h