Skip to content

Reverting #1971 as it was causing latency issues in test canaries #2236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2021
Merged

Reverting #1971 as it was causing latency issues in test canaries #2236

merged 1 commit into from
Jan 13, 2021

Conversation

joviegas
Copy link
Contributor

@joviegas joviegas commented Jan 13, 2021

Description

Reverting #1971 as after this fix there was latency seen in test canaries.

Motivation and Context

  • Checked the thread dump saw lot of instances when the isCompletedOrDeliverEvent and onNext are waiting as onComplete has already acquired the lock.

Testing

  • Tested on Canaries and saw that latency disappeared after the fix was reverted.

Screenshots (if appropriate)

"aws-java-sdk-NettyEventLoop-1-9" #46 daemon prio=5 os_prio=0 tid=0x00007f3f5003f800 nid=0x2998 runnable [0x00007f3fcc77e000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.Thread.setPriority0(Native Method)
	at java.lang.Thread.setPriority(Thread.java:1099)
	at java.lang.Thread.init(Thread.java:418)
	at java.lang.Thread.init(Thread.java:350)
	at java.lang.Thread.<init>(Thread.java:679)
	at java.util.concurrent.Executors$DefaultThreadFactory.newThread(Executors.java:613)
	at software.amazon.awssdk.utils.NamedThreadFactory.newThread(NamedThreadFactory.java:38)
	at software.amazon.awssdk.utils.DaemonThreadFactory.newThread(DaemonThreadFactory.java:34)
	at java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:619)
	at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:932)
	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1367)
	at java.util.concurrent.CompletableFuture.asyncRunStage(CompletableFuture.java:1654)
	at java.util.concurrent.CompletableFuture.runAsync(CompletableFuture.java:1871)
	at software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer.isCompletedOrDeliverEvent(EventStreamAsyncResponseTransformer.java:510)
	- locked <0x00000000c492a728> (a java.util.LinkedList)
	at software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer.drainEvents(EventStreamAsyncResponseTransformer.java:483)
	at software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer.drainEventsIfNotAlready(EventStreamAsyncResponseTransformer.java:469)
	at software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer.access$600(EventStreamAsyncResponseTransformer.java:65)
	at software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer$ByteSubscriber.onNext(EventStreamAsyncResponseTransformer.java:378)
	- locked <0x00000000c492a728> (a java.util.LinkedList)
	at software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer$ByteSubscriber.onNext(EventStreamAsyncResponseTransformer.java:350)
	at software.amazon.awssdk.http.nio.netty.internal.ResponseHandler$PublisherAdapter$1.lambda$onNext$2(ResponseHandler.java:270)
	at software.amazon.awssdk.http.nio.netty.internal.ResponseHandler$PublisherAdapter$1$$Lambda$348/159224483.run(Unknown Source)
	at software.amazon.awssdk.http.nio.netty.internal.utils.ExceptionHandlingUtils.tryCatch(ExceptionHandlingUtils.java:40)
	at software.amazon.awssdk.http.nio.netty.internal.ResponseHandler$PublisherAdapter$1.onNext(ResponseHandler.java:270)
	at software.amazon.awssdk.http.nio.netty.internal.ResponseHandler$PublisherAdapter$1.onNext(ResponseHandler.java:221)
	at software.amazon.awssdk.http.nio.netty.internal.nrs.HandlerPublisher.publishMessage(HandlerPublisher.java:407)
	at software.amazon.awssdk.http.nio.netty.internal.nrs.HandlerPublisher.channelRead(HandlerPublisher.java:383)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@codecov-io
Copy link

codecov-io commented Jan 13, 2021

Codecov Report

Merging #2236 (ef468ec) into master (85c052d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2236      +/-   ##
============================================
- Coverage     77.63%   77.63%   -0.01%     
  Complexity      335      335              
============================================
  Files          1231     1231              
  Lines         38726    38724       -2     
  Branches       3047     3047              
============================================
- Hits          30064    30062       -2     
  Misses         7202     7202              
  Partials       1460     1460              
Flag Coverage Δ Complexity Δ
unittests 77.63% <100.00%> (-0.01%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...entstream/EventStreamAsyncResponseTransformer.java 86.63% <100.00%> (-0.15%) 0.00 <0.00> (ø)
...ty/internal/IdleConnectionCountingChannelPool.java 85.36% <0.00%> (-2.44%) 0.00% <0.00%> (ø%)
...ssdk/core/internal/async/FileAsyncRequestBody.java 82.85% <0.00%> (+1.90%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85c052d...9864c1a. Read the comment docs.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@joviegas joviegas merged commit e20639d into aws:master Jan 13, 2021
aws-sdk-java-automation added a commit that referenced this pull request Nov 7, 2022
…2dbe1fc7e

Pull request: release <- staging/f2980d51-c55a-4fcc-a5a1-0372dbe1fc7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants