juliuszsompolski commented on code in PR #41742:
URL: https://github.com/apache/spark/pull/41742#discussion_r1244102747


##########
core/src/main/scala/org/apache/spark/SparkContext.scala:
##########
@@ -889,6 +893,7 @@ class SparkContext(config: SparkConf) extends Logging {
     Option(getLocalProperty(SparkContext.SPARK_JOB_TAGS))
       .map(_.split(SparkContext.SPARK_JOB_TAGS_SEP).toSet)
       .getOrElse(Set())
+      .filter(!_.isEmpty) // empty string tag should not happen, but be 
defensive

Review Comment:
   ... defensively fix the bug twice :-)



##########
core/src/main/scala/org/apache/spark/SparkContext.scala:
##########
@@ -877,7 +877,11 @@ class SparkContext(config: SparkConf) extends Logging {
     SparkContext.throwIfInvalidTag(tag)
     val existingTags = getJobTags()
     val newTags = (existingTags - 
tag).mkString(SparkContext.SPARK_JOB_TAGS_SEP)
-    setLocalProperty(SparkContext.SPARK_JOB_TAGS, newTags)
+    if (newTags.isEmpty) {
+      clearJobTags()
+    } else {

Review Comment:
   the new R test found a bug so fixed 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to