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

Fix bug in filterChangingBlobsFor() in Slot.java

    XMLWordPrintableJSON

Details

    Description

      The following method is not implemented correctly

       private static DynamicState filterChangingBlobsFor(DynamicState dynamicState, final LocalAssignment assignment) {
              if (!dynamicState.changingBlobs.isEmpty()) {
                  return dynamicState;
              }
      
              HashSet<BlobChanging> savedBlobs = new HashSet<>(dynamicState.changingBlobs.size());
              for (BlobChanging rc : dynamicState.changingBlobs) {
                  if (forSameTopology(assignment, rc.assignment)) {
                      savedBlobs.add(rc);
                  } else {
                      rc.latch.countDown();
                  }
              }
              return dynamicState.withChangingBlobs(savedBlobs);
          }
      
      

      It doesn't modify dynamicState in anyway.
      The solution is to remove the negation in the first if statement.

      Attachments

        Issue Links

          Activity

            People

              zhengdai Zhengdai Hu
              zhengdai Zhengdai Hu
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 40m
                  40m