GitHub PullRequestReviewCommentEvent at 2014-03-07 15:41:01
Repository: spark
Actor: mridulm
Payload: {"comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/10386811","id":10386811,"diff_hunk":"@@ -236,13 +236,23 @@ private class MemoryStore(blockManager: BlockManager, maxMemory: Long)\n         while (maxMemory - (currentMemory - selectedMemory) < space && iterator.hasNext) {\n           val pair = iterator.next()\n           val blockId = pair.getKey\n-          if (rddToAdd.isDefined && rddToAdd == getRddId(blockId)) {\n-            logInfo(\"Will not store \" + blockIdToAdd + \" as it would require dropping another \" +\n-              \"block from the same RDD\")\n-            return false\n+          // Apply the same-RDD rule for cache replacement. Quoted from the\n+          // original RDD paper:\n+          //\n+          //    When a new RDD partition is computed but there is not enough\n+          //    space to store it, we evict a partition from the least recently\n+          //    accessed RDD, unless this is the same RDD as the one with the\n+          //    new partition. In that case, we keep the old partition in memory\n+          //    to prevent cycling partitions from the same RDD in and out.\n+          //\n+          // TODO implement LRU eviction","path":"core/src/main/scala/org/apache/spark/storage/MemoryStore.scala","position":17,"original_position":17,"commit_id":"62c92ac7b8e616529bdaa52b73eb70e50bc01b47","original_commit_id":"62c92ac7b8e616529bdaa52b73eb70e50bc01b47","user":{"login":"mridulm","id":1591700,"avatar_url":"https://gravatar.com/avatar/0c6f3ad3eb45b1c42ca026f9d6ff3794?d=https%3A%2F%2Fidenticons.github.com%2Feed4d497b06cb847301ab49f40608dd4.png&r=x","gravatar_id":"0c6f3ad3eb45b1c42ca026f9d6ff3794","url":"https://api.github.com/users/mridulm","html_url":"https://github.com/mridulm","followers_url":"https://api.github.com/users/mridulm/followers","following_url":"https://api.github.com/users/mridulm/following{/other_user}","gists_url":"https://api.github.com/users/mridulm/gists{/gist_id}","starred_url":"https://api.github.com/users/mridulm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mridulm/subscriptions","organizations_url":"https://api.github.com/users/mridulm/orgs","repos_url":"https://api.github.com/users/mridulm/repos","events_url":"https://api.github.com/users/mridulm/events{/privacy}","received_events_url":"https://api.github.com/users/mridulm/received_events","type":"User","site_admin":false},"body":"entries is already a LinkedHashMap - so you iterate in LRU : you can remove the comment.","created_at":"2014-03-07T15:41:01Z","updated_at":"2014-03-07T15:41:01Z","html_url":"https://github.com/apache/spark/pull/96#discussion_r10386811","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/10386811"},"html":{"href":"https://github.com/apache/spark/pull/96#discussion_r10386811"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/96"}}}}