Skip to content

SettableListenableFuture may be successfully set with failureCallback executed and success callback ignored [SPR-15216] #19781

Closed

Description

@spring-projects-issues

Ivan Sopov opened SPR-15216 and commented

Version that I tested is 4.3.7.BUILD-SNAPSHOT with the fix for #19766

I've checked fix for #19766 and it works. But I have wrote another test:

https://github.com/isopov/isopov-jcstress/blob/master/src/main/java/com/sopovs/moradanen/jcstress/spring/SettableListenableFuture2Test.java

It reveals that it is possible to successfully set value for this future, but success callback will not be executed and failure callback instead will be called. As in previous case it is the case of concurrently setting and cancelling future under race.


Affects: 4.3.6

Issue Links:

Activity

  1. spring-projects-issues commented on Feb 2, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Good catch! I've revised our SettableListenableFuture implementation once more, now centralizing all state into the inner FutureTask subclass (through overriding FutureTask.set and FutureTask.setException and bypassing FutureTask.run completely).

    I'll ping you once this is available in a new 4.3.7 snapshot.

  2. spring-projects-issues commented on Feb 2, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    A new 4.3.7.BUILD-SNAPSHOT containing this latest variant of SettableListenableFuture is available now. Please give it a try...

  3. spring-projects-issues commented on Feb 3, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Ivan Sopov commented

    Thanks, my jcstress-based tests pass.

  4. added
    type: bug
    in: core
    on Jan 11, 2019
  5. added this to the 4.3.7 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions