You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2020/09/16 15:59:20 UTC

[GitHub] [storm] bipinprasad commented on a change in pull request #3274: [STORM-3639] Replace asserts in daemon code.

bipinprasad commented on a change in pull request #3274:
URL: https://github.com/apache/storm/pull/3274#discussion_r489550363



##########
File path: storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
##########
@@ -814,7 +814,12 @@ private static int numUsedWorkers(SchedulerAssignment assignment) {
 
     private boolean auditAssignmentChanges(Map<String, Assignment> existingAssignments,
                                            Map<String, Assignment> newAssignments) {
-        assert existingAssignments != null && newAssignments != null;
+        if (existingAssignments == null) {

Review comment:
       First one is not required as it is never true (i.e a superfluous check in a private method - and is never activate at runtime - since it was in an assert to begin with.
   
   Second one is a legitimate check that should be done at runtime. But was in an assert earlier and not activate earlier, but should be active.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org