You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/10/11 06:34:58 UTC
[PR] [SPARK-45499][CORE][TESTS] Replace `Reference#isEnqueued` with `Reference#refersTo` [spark]
LuciferYang opened a new pull request, #43325:
URL: https://github.com/apache/spark/pull/43325
### What changes were proposed in this pull request?
This pr just replace `Reference#isEnqueued` with `Reference#refersTo` in `CompletionIteratorSuite`, the solution refer to
https://github.com/openjdk/jdk/blob/dfacda488bfbe2e11e8d607a6d08527710286982/src/java.base/share/classes/java/lang/ref/Reference.java#L436-L454
```
* @deprecated
* This method was originally specified to test if a reference object has
* been cleared and enqueued but was never implemented to do this test.
* This method could be misused due to the inherent race condition
* or without an associated {@code ReferenceQueue}.
* An application relying on this method to release critical resources
* could cause serious performance issue.
* An application should use {@link ReferenceQueue} to reliably determine
* what reference objects that have been enqueued or
* {@link #refersTo(Object) refersTo(null)} to determine if this reference
* object has been cleared.
*
* @return {@code true} if and only if this reference object is
* in its associated queue (if any).
*/
@Deprecated(since="16")
public boolean isEnqueued() {
return (this.queue == ReferenceQueue.ENQUEUED);
}
```
### Why are the changes needed?
Clean up deprecated api usage.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass GitHub Actions
### Was this patch authored or co-authored using generative AI tooling?
No
--
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
Re: [PR] [SPARK-45499][CORE][TESTS] Replace `Reference#isEnqueued` with `Reference#refersTo(null)` [spark]
Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #43325:
URL: https://github.com/apache/spark/pull/43325#issuecomment-1758737300
Sorry, it seems that the changed test cases have a chance of failing. I will investigate this today and if there is no progress, I'll revert this PR first.
https://github.com/apache/spark/actions/runs/6484510414/job/17608536854
```
2023-10-11T18:19:40.4344178Z [0m[[0m[0minfo[0m] [0m[0m[31m- reference to sub iterator should not be available after completion *** FAILED *** (226 milliseconds)[0m[0m
2023-10-11T18:19:40.4353343Z [0m[[0m[0minfo[0m] [0m[0m[31m null did not equal java.lang.ref.PhantomReference@49631390 (CompletionIteratorSuite.scala:67)[0m[0m
2023-10-11T18:19:40.4355215Z [0m[[0m[0minfo[0m] [0m[0m[31m org.scalatest.exceptions.TestFailedException:[0m[0m
2023-10-11T18:19:40.4357722Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)[0m[0m
2023-10-11T18:19:40.4360203Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)[0m[0m
2023-10-11T18:19:40.4362462Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.Assertions$.newAssertionFailedException(Assertions.scala:1231)[0m[0m
2023-10-11T18:19:40.4364350Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:1295)[0m[0m
2023-10-11T18:19:40.4366469Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.apache.spark.util.CompletionIteratorSuite.$anonfun$new$3(CompletionIteratorSuite.scala:67)[0m[0m
2023-10-11T18:19:40.4369159Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.enablers.Timed$$anon$1.timeoutAfter(Timed.scala:127)[0m[0m
2023-10-11T18:19:40.4372116Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.concurrent.TimeLimits$.failAfterImpl(TimeLimits.scala:282)[0m[0m
2023-10-11T18:19:40.4377482Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.concurrent.TimeLimits.failAfter(TimeLimits.scala:231)[0m[0m
2023-10-11T18:19:40.4380196Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.scalatest.concurrent.TimeLimits.failAfter$(TimeLimits.scala:230)[0m[0m
2023-10-11T18:19:40.4382087Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.apache.spark.SparkFunSuite.failAfter(SparkFunSuite.scala:69)[0m[0m
2023-10-11T18:19:40.4383931Z [0m[[0m[0minfo[0m] [0m[0m[31m at org.apache.spark.SparkFunSuite.$anonfun$test$2(SparkFunSuite.scala:155)[0m[0m
```
--
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
Re: [PR] [SPARK-45499][CORE][TESTS] Replace `Reference#isEnqueued` with `Reference#refersTo(null)` [spark]
Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #43325:
URL: https://github.com/apache/spark/pull/43325#issuecomment-1757918791
Thanks @dongjoon-hyun @yaooqinn
--
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
Re: [PR] [SPARK-45499][CORE][TESTS] Replace `Reference#isEnqueued` with `Reference#refersTo(null)` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #43325: [SPARK-45499][CORE][TESTS] Replace `Reference#isEnqueued` with `Reference#refersTo(null)`
URL: https://github.com/apache/spark/pull/43325
--
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
Re: [PR] [SPARK-45499][CORE][TESTS] Replace `Reference#isEnqueued` with `Reference#refersTo(null)` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #43325:
URL: https://github.com/apache/spark/pull/43325#issuecomment-1757917552
Merged to master. Thank you all.
--
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