Github user liyezhang556520 commented on a diff in the pull request:
https://github.com/apache/spark/pull/791#discussion_r17463717
--- Diff: core/src/main/scala/org/apache/spark/storage/MemoryStore.scala ---
@@ -248,28 +264,30 @@ private class MemoryStore(blockManager: BlockManager,
maxMemory: Long)
if (maxMemory - (currentMemory - selectedMemory) >= space) {
logInfo(s"${selectedBlocks.size} blocks selected for dropping")
for (blockId <- selectedBlocks) {
- val entry = entries.synchronized { entries.get(blockId) }
--- End diff --
And both the two threads comes here, the condition "`maxMemory -
(currentMemory - selectedMemory) >= space`" will be true for both threads. In
fact, the memory that dropped is not enough for the two thread, since the two
threads both viewed the `freeMemory` as available and used twice.
---
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]