[
https://issues.apache.org/jira/browse/APEXMALHAR-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15285741#comment-15285741
]
ASF GitHub Bot commented on APEXMALHAR-2078:
--------------------------------------------
Github user chandnisingh commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/268#discussion_r63449900
--- Diff:
library/src/main/java/com/datatorrent/lib/io/fs/FileSplitterInput.java ---
@@ -461,8 +465,11 @@ private void addToDiscoveredFiles(Path rootPath,
FileStatus parentStatus, FileSt
Path childPath = childStatus.getPath();
String childPathStr = childPath.toUri().getPath();
// Directory by now is scanned forcibly. Now check for whether
file/directory needs to be added to discoveredFiles.
- Long oldModificationTime =
lastModifiedTimesForInputDir.get(childPathStr);
- lastModifiedTimesForInputDir.put(childPathStr,
childStatus.getModificationTime());
+ Long oldModificationTime = null;
+ if (lastModifiedTimesForInputDir != null) {
+ oldModificationTime =
lastModifiedTimesForInputDir.get(childPathStr);
+ }
+// lastModifiedTimesForInputDir.put(childPathStr,
childStatus.getModificationTime());
--- End diff --
please remove this comment.
> Potential thread issue in FileSplitterInput class
> -------------------------------------------------
>
> Key: APEXMALHAR-2078
> URL: https://issues.apache.org/jira/browse/APEXMALHAR-2078
> Project: Apache Apex Malhar
> Issue Type: Bug
> Reporter: Priyanka Gugale
> Assignee: Priyanka Gugale
> Fix For: 3.4.0
>
>
> The "inputDirTolastModifiedTimes" field is modified by multiple threads and
> check pointed by operator thread. This could cause threading issues.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)