attilapiros commented on a change in pull request #23614: 
[SPARK-26689][CORE]Support blacklisting bad disk directory and retry in 
DiskBlockManager
URL: https://github.com/apache/spark/pull/23614#discussion_r252257090
 
 

 ##########
 File path: 
core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala
 ##########
 @@ -91,4 +91,24 @@ class DiskBlockManagerSuite extends SparkFunSuite with 
BeforeAndAfterEach with B
     for (i <- 0 until numBytes) writer.write(i)
     writer.close()
   }
+
+  test("test blacklisting bad disk directory") {
+    val blockId = new TestBlockId("1")
+    val hash = Utils.nonNegativeHash(blockId.name)
+    val (badDiskDir, goodDiskDir) = if (hash % 2 == 0) {
 
 Review comment:
   I guess the purpose of this randomisation for choosing 
`goodDiskDir`/`badDiskDir` from `rootDirs` is to test from run to run the case 
when not the good dir is chosen first by `diskBlockManager`. 
   
   I would strongly suggest to avoid this as sometimes the feature is not 
tested and the introduced bug could be detected at the testing of an unrelated 
different change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to