Skip to content

Conversation

@JoshRosen
Copy link
Contributor

RuleExecutor.timeMap is currently a non-thread-safe mutable HashMap; this can lead to infinite loops if multiple threads are concurrently modifying the map. I believe that this is responsible for some hangs that I've observed in HiveQuerySuite.

This patch addresses this by using a Guava AtomicLongMap.

@JoshRosen
Copy link
Contributor Author

/cc @marmbrus

@JoshRosen JoshRosen changed the title [SPARK-9854] RuleExecutor.timeMap should be thread-safe [SPARK-9854] [SQL] RuleExecutor.timeMap should be thread-safe Aug 12, 2015
@marmbrus
Copy link
Contributor

LGTM

@JoshRosen
Copy link
Contributor Author

SparkQA is going to be unable to post build statuses here due to a temporary Jenkins configuration break, but we can manually check the outcome at https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/40559/. If this passes tests then I'm going to merge it immediately since I think this might cut down on a lot of the timeout-related flakiness that we've been seeing.

@JoshRosen
Copy link
Contributor Author

Jenkins, retest this please.

2 similar comments
@JoshRosen
Copy link
Contributor Author

Jenkins, retest this please.

@JoshRosen
Copy link
Contributor Author

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Aug 12, 2015

Test build #1471 has finished for PR 8120 at commit 615d08e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@JoshRosen
Copy link
Contributor Author

I'm going to merge this to master and branch-1.5.

asfgit pushed a commit that referenced this pull request Aug 12, 2015
`RuleExecutor.timeMap` is currently a non-thread-safe mutable HashMap; this can lead to infinite loops if multiple threads are concurrently modifying the map.  I believe that this is responsible for some hangs that I've observed in HiveQuerySuite.

This patch addresses this by using a Guava `AtomicLongMap`.

Author: Josh Rosen <joshrosen@databricks.com>

Closes #8120 from JoshRosen/rule-executor-time-map-fix.

(cherry picked from commit b1581ac)
Signed-off-by: Josh Rosen <joshrosen@databricks.com>
@SparkQA
Copy link

SparkQA commented Aug 12, 2015

Test build #1472 has finished for PR 8120 at commit 615d08e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@asfgit asfgit closed this in b1581ac Aug 12, 2015
CodingCat pushed a commit to CodingCat/spark that referenced this pull request Aug 17, 2015
`RuleExecutor.timeMap` is currently a non-thread-safe mutable HashMap; this can lead to infinite loops if multiple threads are concurrently modifying the map.  I believe that this is responsible for some hangs that I've observed in HiveQuerySuite.

This patch addresses this by using a Guava `AtomicLongMap`.

Author: Josh Rosen <joshrosen@databricks.com>

Closes apache#8120 from JoshRosen/rule-executor-time-map-fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants