Skip to content

Change in Behavior of Client Interrupts Between V1 and V2 #5979

Open
@belugabehr

Description

@belugabehr

Describe the bug

In AWS JDK V2, when a client is interrupted, it does not clears the Interrupted Flag. However, there is a comment stating that it does.

/**
* Aborts with subclass specific abortion logic executed if needed.
* Note the interrupted status of the thread is cleared by this method.
*
* @throws AbortedException if found necessary.
*/
protected final void abortIfNeeded() {
if (Thread.currentThread().isInterrupted()) {
abort(); // execute subclass specific abortion logic
throw AbortedException.builder().build();
}
}

In AWS JDK V1, there interrupted status is indeed cleared.

Please ensure that V2 maintains the same behavior and clear the flag. This will help migrations from V1 to V2.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The Interrupt flag should be cleared.

Current Behavior

The Interrupt flag is not cleared.

Reproduction Steps

Provided code samples in description.

Possible Solution

Provided suggesting in description.

Additional Information/Context

No response

AWS Java SDK version used

2

JDK version used

17

Operating System and version

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.documentationThis is a problem with documentation.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions