Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/3635#discussion_r21449898
--- Diff:
core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala ---
@@ -67,11 +67,14 @@ private[spark] class DiskBlockManager(blockManager:
BlockManager, conf: SparkCon
if (subDir == null) {
subDir = subDirs(dirId).synchronized {
val old = subDirs(dirId)(subDirId)
- if (old != null) {
+ if (old != null && old.exists()) {
old
} else {
val newDir = new File(localDirs(dirId), "%02x".format(subDirId))
- newDir.mkdir()
+ val foundLocalDir = newDir.mkdir()
+ if (!foundLocalDir) {
--- End diff --
Indent has one too many spaces. The message should probably be a warning.
It says "ignoring this directory" but it doesn't seem to be ignored? You
changed the semantics of the condition too, to replace a value that was a
non-existent dir. That seems reasonable, but this can replace it with a
directory that can't be created for some reason. Is this not an exception
condition?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]