Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10170#discussion_r47021623
  
    --- Diff: 
core/src/test/scala/org/apache/spark/memory/UnifiedMemoryManagerSuite.scala ---
    @@ -117,25 +118,29 @@ class UnifiedMemoryManagerSuite extends 
MemoryManagerSuite with PrivateMethodTes
         val (mm, ms) = makeThings(maxMemory)
         // Acquire enough storage memory to exceed the storage region
         assert(mm.acquireStorageMemory(dummyBlock, 750L, evictedBlocks))
    -    assertEnsureFreeSpaceCalled(ms, 750L)
    +    assertEvictBlocksToFreeSpaceNotCalled(ms)
         assert(mm.executionMemoryUsed === 0L)
         assert(mm.storageMemoryUsed === 750L)
    +    assert(evictedBlocks.isEmpty)
         // Execution needs to request 250 bytes to evict storage memory
         assert(mm.acquireExecutionMemory(100L, taskAttemptId, 
MemoryMode.ON_HEAP) === 100L)
         assert(mm.executionMemoryUsed === 100L)
         assert(mm.storageMemoryUsed === 750L)
    -    assertEnsureFreeSpaceNotCalled(ms)
    +    assertEvictBlocksToFreeSpaceNotCalled(ms)
    +    assert(evictedBlocks.isEmpty)
    --- End diff --
    
    should this assert just go into the body of the previous one? i.e. 
`assertEvictBlocksToFreeSpaceNotCalled` internally also checks that 
`evictedBlocks` is empty. I notice we have these 2 lines in quite a few places.


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

Reply via email to