dasahcc commented on a change in pull request #1040:
URL: https://github.com/apache/helix/pull/1040#discussion_r432767224



##########
File path: 
helix-core/src/main/java/org/apache/helix/task/AbstractTaskDispatcher.java
##########
@@ -449,43 +448,31 @@ private void 
updatePartitionInformationInJobContext(CurrentStateOutput currentSt
    * @param paMap
    * @param assignedPartitions
    */
-  private void processTaskWithPendingMessage(ResourceAssignment 
prevAssignment, Integer pId,
-      String pName, String instance, Message pendingMessage, TaskState 
jobState,
-      TaskPartitionState currState, Map<Integer, PartitionAssignment> paMap,
-      Map<String, Set<Integer>> assignedPartitions) {
-
-    // stateMap is a mapping of Instance -> TaskPartitionState (String)
-    Map<String, String> stateMap = prevAssignment.getReplicaMap(new 
Partition(pName));
-    if (stateMap != null) {
-      String prevState = stateMap.get(instance);
-      if (!pendingMessage.getToState().equals(prevState)) {
-        LOG.warn(String.format(
-            "Task pending to-state is %s while previous assigned state is %s. 
This should not"
-                + "happen.",
-            pendingMessage.getToState(), prevState));
+  private void processTaskWithPendingMessage(Integer pId, String pName, String 
instance,
+      Message pendingMessage, TaskState jobState, TaskPartitionState currState,
+      Map<Integer, PartitionAssignment> paMap, Map<String, Set<Integer>> 
assignedPartitions) {
+
+    if (jobState == TaskState.TIMING_OUT && currState == 
TaskPartitionState.INIT
+        && 
pendingMessage.getToState().equals(TaskPartitionState.RUNNING.name())) {

Review comment:
       Could this cause problem? If there is a cancel message, so the toState 
is not RUNNING, it should INIT? Then are we cancelling the CANCEL message?




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to