You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/16 07:21:28 UTC

[GitHub] [spark] ulysses-you opened a new pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

ulysses-you opened a new pull request #34919:
URL: https://github.com/apache/spark/pull/34919


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Add lock between list and delet log info in `FsHistoryProvider.checkForLogs`.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   After [SPARK-29043](https://issues.apache.org/jira/browse/SPARK-29043), `FsHistoryProvider` will list the log info without waitting all `mergeApplicationListing` task finished.
   
   However the `LevelDBIterator` of list log info is not thread safe if some other threads delete the related log info at same time.
   
   There is the error msg:
   ```
   21/12/15 14:12:02 ERROR FsHistoryProvider: Exception in checking for event log updates
   java.util.NoSuchElementException: 1^@__main__^@+hdfs://xxx/application_xxx.inprogress
           at org.apache.spark.util.kvstore.LevelDB.get(LevelDB.java:132)
           at org.apache.spark.util.kvstore.LevelDBIterator.next(LevelDBIterator.java:137)
           at scala.collection.convert.Wrappers$JIteratorWrapper.next(Wrappers.scala:44)
           at scala.collection.Iterator.foreach(Iterator.scala:941)
           at scala.collection.Iterator.foreach$(Iterator.scala:941)
           at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
           at scala.collection.IterableLike.foreach(IterableLike.scala:74)
           at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
           at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
           at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:62)
           at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
           at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:184)
           at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:47)
           at scala.collection.TraversableLike.to(TraversableLike.scala:678)
           at scala.collection.TraversableLike.to$(TraversableLike.scala:675)
           at scala.collection.AbstractTraversable.to(Traversable.scala:108)
           at scala.collection.TraversableOnce.toList(TraversableOnce.scala:299)
           at scala.collection.TraversableOnce.toList$(TraversableOnce.scala:299)
           at scala.collection.AbstractTraversable.toList(Traversable.scala:108)
           at org.apache.spark.deploy.history.FsHistoryProvider.checkForLogs(FsHistoryProvider.scala:588)
           at org.apache.spark.deploy.history.FsHistoryProvider.$anonfun$startPolling$3(FsHistoryProvider.scala:299)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   yes, bug fix
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   manual test, after this patch the exception go away


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998445779


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50889/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gengliangwang closed pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
gengliangwang closed pull request #34919:
URL: https://github.com/apache/spark/pull/34919


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997135057


   **[Test build #146348 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146348/testReport)** for PR 34919 at commit [`13192c8`](https://github.com/apache/spark/commit/13192c8647a9f382a52bfda286fa5d4cfb7b3ad8).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995636948


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/146265/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995509787


   **[Test build #146265 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146265/testReport)** for PR 34919 at commit [`e12cc5f`](https://github.com/apache/spark/commit/e12cc5fb926db0fc68ee7f529251ac480907b6f0).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997154316


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/146348/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998467423


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/146414/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995589016


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50740/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997152590


   **[Test build #146348 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146348/testReport)** for PR 34919 at commit [`13192c8`](https://github.com/apache/spark/commit/13192c8647a9f382a52bfda286fa5d4cfb7b3ad8).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-1000159998


   thank you @gengliangwang and all !
   
   I'm fine to branch-3.2.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gengliangwang commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-1000267281


   @dongjoon-hyun +1. 
   @ulysses-you could you create a PR to backport this to branch-3.2?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997154316


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/146348/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995589016


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50740/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998417786


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50889/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998401647


   **[Test build #146414 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146414/testReport)** for PR 34919 at commit [`56127c6`](https://github.com/apache/spark/commit/56127c6d592632f3dbcbfc2da918fd65d070e2b2).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on a change in pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
srowen commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r771776369



##########
File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -464,6 +464,10 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
     secManager.checkUIViewPermissions(user)
   }
 
+  private def withListingLock[A](f: => A): A = listing.synchronized {

Review comment:
       No, why even bother with this method? seems like more code and indirection than just using `listing.synchronized {` below




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997141621


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50823/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995652284


   cc @turboFei  @vanzin @HeartSaVioR @gengliangwang  if you have time to take a look


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998443544


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50889/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995628150


   **[Test build #146265 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146265/testReport)** for PR 34919 at commit [`e12cc5f`](https://github.com/apache/spark/commit/e12cc5fb926db0fc68ee7f529251ac480907b6f0).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997148684


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50823/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on a change in pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r773746786



##########
File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -583,11 +583,13 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
       //
       // Only entries with valid applications are cleaned up here. Cleaning up invalid log
       // files is done by the periodic cleaner task.
-      val stale = listing.view(classOf[LogInfo])
-        .index("lastProcessed")
-        .last(newLastScanTime - 1)
-        .asScala
-        .toList
+      val stale = listing.synchronized {
+        listing.view(classOf[LogInfo])
+          .index("lastProcessed")
+          .last(newLastScanTime - 1)
+          .asScala
+          .toList
+      }

Review comment:
       It should not happen that we delete info here and  `mergeApplicationListing` task together since the conflicts have been evicted by `isProcessing` and `notStale`, so I think it should be fine just leave it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998465530


   **[Test build #146414 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146414/testReport)** for PR 34919 at commit [`56127c6`](https://github.com/apache/spark/commit/56127c6d592632f3dbcbfc2da918fd65d070e2b2).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995578296


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50740/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on a change in pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r771775630



##########
File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -464,6 +465,10 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
     secManager.checkUIViewPermissions(user)
   }
 
+  private def withListingLock[A](f: => A): A = listingLock.synchronized {

Review comment:
       thank you @srowen changed to `listing`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-1000326203


   created https://github.com/apache/spark/pull/35003


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gengliangwang commented on a change in pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r773708451



##########
File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -583,11 +583,13 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
       //
       // Only entries with valid applications are cleaned up here. Cleaning up invalid log
       // files is done by the periodic cleaner task.
-      val stale = listing.view(classOf[LogInfo])
-        .index("lastProcessed")
-        .last(newLastScanTime - 1)
-        .asScala
-        .toList
+      val stale = listing.synchronized {
+        listing.view(classOf[LogInfo])
+          .index("lastProcessed")
+          .last(newLastScanTime - 1)
+          .asScala
+          .toList
+      }

Review comment:
       on second thought, shall we put line 593 to line 600 in to `listing.synchronized {}` as well ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998445779


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50889/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997135057


   **[Test build #146348 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146348/testReport)** for PR 34919 at commit [`13192c8`](https://github.com/apache/spark/commit/13192c8647a9f382a52bfda286fa5d4cfb7b3ad8).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997148679


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50823/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995509787


   **[Test build #146265 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146265/testReport)** for PR 34919 at commit [`e12cc5f`](https://github.com/apache/spark/commit/e12cc5fb926db0fc68ee7f529251ac480907b6f0).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-1000116776


   +1, LGTM. Thank you, all.
   Can we have this bug fix in branch-3.2, too?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998467423


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/146414/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] gengliangwang commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-1000093090


   Thanks, merging to master


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995542585


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50740/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on a change in pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
srowen commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r771602918



##########
File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -464,6 +465,10 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
     secManager.checkUIViewPermissions(user)
   }
 
+  private def withListingLock[A](f: => A): A = listingLock.synchronized {

Review comment:
       Why not just sync on `listing`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-995636948


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/146265/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997148684


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50823/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] mridulm commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
mridulm commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-997158421


   +CC @thejdeep You had mentioned about something similar IIRC; please take a look.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-1000116776


   +1, LGTM. Thank you, all.
   Can we have this bug fix in branch-3.2, too?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34919:
URL: https://github.com/apache/spark/pull/34919#issuecomment-998401647


   **[Test build #146414 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146414/testReport)** for PR 34919 at commit [`56127c6`](https://github.com/apache/spark/commit/56127c6d592632f3dbcbfc2da918fd65d070e2b2).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on a change in pull request #34919: [SPARK-37659][UI] Fix FsHistoryProvider race condition between list and delet log info

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r772772356



##########
File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -464,6 +464,10 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
     secManager.checkUIViewPermissions(user)
   }
 
+  private def withListingLock[A](f: => A): A = listing.synchronized {

Review comment:
       yes, simplified to `listing.synchronized`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org