github-advanced-security[bot] commented on code in PR #18466:
URL: https://github.com/apache/druid/pull/18466#discussion_r2348415257


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -819,6 +1104,31 @@
     }
   }
 
+  /**
+   * This function verifies whether the checkpoint received from a task is 
valid or not.
+   * In non-perpetual tasks, the checkpoint is valid if it matches one of the 
partition <> sequence numbers in the task checkpoints.
+   * In perpetual tasks, this does not hold valid anymore because partition 
assignments can change during dynamic scaling. We'll compare
+   * it with supervisor level partition group's partition assignments now.
+   */
+  private boolean isCheckpointSignatureValid(
+      Map<PartitionIdType, SequenceOffsetType> checkpoint,
+      SeekableStreamDataSourceMetadata<PartitionIdType, SequenceOffsetType> 
checkpointMetadata
+  )
+  {
+    var checkpointPresentAlready = checkpoint;
+    var checkpointProposed = 
checkpointMetadata.getSeekableStreamSequenceNumbers().getPartitionSequenceNumberMap();

Review Comment:
   ## Unread local variable
   
   Variable 'Map<PartitionIdType,SequenceOffsetType> checkpointProposed' is 
never read.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/10330)



##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -819,6 +1104,31 @@
     }
   }
 
+  /**
+   * This function verifies whether the checkpoint received from a task is 
valid or not.
+   * In non-perpetual tasks, the checkpoint is valid if it matches one of the 
partition <> sequence numbers in the task checkpoints.
+   * In perpetual tasks, this does not hold valid anymore because partition 
assignments can change during dynamic scaling. We'll compare
+   * it with supervisor level partition group's partition assignments now.
+   */
+  private boolean isCheckpointSignatureValid(
+      Map<PartitionIdType, SequenceOffsetType> checkpoint,
+      SeekableStreamDataSourceMetadata<PartitionIdType, SequenceOffsetType> 
checkpointMetadata
+  )
+  {
+    var checkpointPresentAlready = checkpoint;

Review Comment:
   ## Unread local variable
   
   Variable 'Map<PartitionIdType,SequenceOffsetType> checkpointPresentAlready' 
is never read.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/10329)



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

To unsubscribe, e-mail: [email protected]

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