You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rh99 <gi...@git.apache.org> on 2015/12/02 11:31:21 UTC
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
GitHub user rh99 opened a pull request:
https://github.com/apache/spark/pull/10101
[SPARK-12048][SQL] Prevent to close JDBC resources twice
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rh99/spark master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10101.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #10101
----
commit 4289a440167af3e7ea2befc74e5891179f186ca5
Author: gcc <sp...@condor.rhaag.ip>
Date: 2015-12-02T08:45:06Z
[SPARK-12048][SQL] Prevent to close JDBC resources 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by rh99 <gi...@git.apache.org>.
Github user rh99 commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-162039294
All exceptions are caught anyway, so it will always reach the end (if there is no Error).
My reasoning was: If the code was changed, and it would really throw an exception somewhere in the middle, the location at the end is better, since the variable "closed" should only be true, if all JDBC resources have been closed. Otherwise the variable should have a name like "guard". Anyway either location is fine.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-162313589
**[Test build #2174 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2174/consoleFull)** for PR 10101 at commit [`4289a44`](https://github.com/apache/spark/commit/4289a440167af3e7ea2befc74e5891179f186ca5).
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by rh99 <gi...@git.apache.org>.
Github user rh99 commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-162469980
Thanks for including that fix so fast. I have just tested to fix in the master successfully.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/10101
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-162048177
Throwables aren't caught though. I suppose I don't feel strongly about it as you can argue a benefit either way. Any other ideas out there? otherwise will merge soonish.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-161251260
Can one of the admins verify this patch?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-162327169
Merged to master/1.6/1.5
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-162320823
**[Test build #2174 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2174/consoleFull)** for PR 10101 at commit [`4289a44`](https://github.com/apache/spark/commit/4289a440167af3e7ea2befc74e5891179f186ca5).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/10101#issuecomment-161982352
@rh99 are you still working on this? seems like a good fix but I have one other comment here.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-12048][SQL] Prevent to close JDBC resou...
Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/10101#discussion_r46399345
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala ---
@@ -509,6 +509,7 @@ private[sql] class JDBCRDD(
} catch {
case e: Exception => logWarning("Exception closing connection", e)
}
+ closed = true
--- End diff --
I think this should go at the top, right after it is checked. My reasoning is that if close fails, it would let itself be called again, and that's not obviously helpful, I think.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org