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/10/23 16:17:52 UTC

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

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



##########
File path: storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
##########
@@ -810,9 +810,15 @@ private static int numUsedWorkers(SchedulerAssignment assignment) {
         return ret;
     }
 
+    /**
+     * Check new assignments with existing assignments and determine difference is any.
+     *
+     * @param existingAssignments non-null map of topology-id to existing assignments.
+     * @param newAssignments non-null map of topology-id to new assignments.
+     * @return true if there is a change in assignments, false otherwise.
+     */
     private boolean auditAssignmentChanges(Map<String, Assignment> existingAssignments,
                                            Map<String, Assignment> newAssignments) {
-        assert existingAssignments != null && newAssignments != null;

Review comment:
       why remove these checks?

##########
File path: storm-server/src/main/java/org/apache/storm/scheduler/TopologyDetails.java
##########
@@ -514,8 +514,13 @@ private void initConfigs() {
         this.topologyPriority =
             ObjectReader.getInt(topologyConf.get(Config.TOPOLOGY_PRIORITY), null);
 
-        assert this.topologyWorkerMaxHeapSize != null;
-        assert this.topologyPriority != null;
+        // Fails in storm-core: org.apache.storm.scheduler-test / testname: test-cluster

Review comment:
       I would leave these asserts here and file a JIRA to address fixing the test and replacing these asserts specifically.  




----------------------------------------------------------------
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