Skip to content
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

UpgradeHandler may not notify the application to read the initial data that sent along with the upgrade request. #30328

Open
wants to merge 3 commits into
base: integration
Choose a base branch
from

Conversation

pmd1nh
Copy link
Member

@pmd1nh pmd1nh commented Dec 3, 2024

################################################################################################

fixed #30341

@pmd1nh
Copy link
Member Author

pmd1nh commented Dec 3, 2024

#build
(view Open Liberty Personal Build - ❌ completed with errors/failures.)
#spawn.fullfat.buckets=io.openliberty.webcontainer.servlet.6.1.internal_fat,io.openliberty.webcontainer.servlet.6.0.internal_fat,com.ibm.ws.webcontainer.servlet.6.1_fat_toleration.lWAS,com.ibm.ws.webcontainer.servlet.6.0_fat_toleration.lWAS,com.ibm.ws.webcontainer_fat,com.ibm.ws.webcontainer.servlet.3.1_fat,com.ibm.ws.webcontainer.servlet.3.1_fat.2,com.ibm.ws.webcontainer.servlet.4.0_fat,com.ibm.ws.webcontainer_fat_part2,com.ibm.ws.webcontainer_fat_servlet31toleration,com.ibm.ws.webcontainer_fat_servlet31toleration_part2,com.ibm.ws.webcontainer.servlet.4.0_fat_toleration.3.0,com.ibm.ws.webcontainer.servlet.4.0_fat_toleration.3.0_part2,com.ibm.ws.webcontainer_fat_lWAS,com.ibm.ws.webcontainer_fat_servlet31_webcontainerlWAS,com.ibm.ws.webcontainer.servlet.4.0_fat_toleration.3.0.lWAS,com.ibm.ws.transport.http_test

@LibbyBot
Copy link

LibbyBot commented Dec 3, 2024

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 4 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@LibbyBot
Copy link

LibbyBot commented Dec 3, 2024

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_dB-V0bHHEe-Q24Sd2QdBoQ

Target locations of links might be accessible only to IBM employees.

@pmd1nh pmd1nh force-pushed the UpgradeHandler_May_Miss_Initial_Data branch from f96ee7b to e3d7006 Compare December 4, 2024 19:21
@pmd1nh
Copy link
Member Author

pmd1nh commented Dec 4, 2024

#build
(view Open Liberty Personal Build - ❌ completed with errors/failures.)

#spawn.fullfat.buckets=io.openliberty.webcontainer.servlet.6.1.internal_fat,io.openliberty.webcontainer.servlet.6.0.internal_fat,com.ibm.ws.webcontainer.servlet.6.1_fat_toleration.lWAS,com.ibm.ws.webcontainer.servlet.6.0_fat_toleration.lWAS,com.ibm.ws.webcontainer_fat,com.ibm.ws.webcontainer.servlet.3.1_fat,com.ibm.ws.webcontainer.servlet.3.1_fat.2,com.ibm.ws.webcontainer.servlet.4.0_fat,com.ibm.ws.webcontainer_fat_part2,com.ibm.ws.webcontainer_fat_servlet31toleration,com.ibm.ws.webcontainer_fat_servlet31toleration_part2,com.ibm.ws.webcontainer.servlet.4.0_fat_toleration.3.0,com.ibm.ws.webcontainer.servlet.4.0_fat_toleration.3.0_part2,com.ibm.ws.webcontainer_fat_lWAS,com.ibm.ws.webcontainer_fat_servlet31_webcontainerlWAS,com.ibm.ws.webcontainer.servlet.4.0_fat_toleration.3.0.lWAS,com.ibm.ws.transport.http_test

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

LibbyBot commented Dec 4, 2024

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 4 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@pmd1nh pmd1nh force-pushed the UpgradeHandler_May_Miss_Initial_Data branch from e3d7006 to b9d4c8e Compare December 4, 2024 19:54
@LibbyBot
Copy link

LibbyBot commented Dec 5, 2024

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_lcwZ0LLEEe-Q24Sd2QdBoQ

Target locations of links might be accessible only to IBM employees.

isaacrivriv
isaacrivriv previously approved these changes Dec 13, 2024
Copy link
Member

@isaacrivriv isaacrivriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this, changes look good to me

@pmd1nh pmd1nh changed the title UpgradeHandler may not read the initial data UpgradeHandler may not notify the application to read the initial data that sent along with the upgrade request. Dec 13, 2024
@pnicolucci
Copy link
Member

@pmd1nh the parent issue needs to be updated to use the release bug template. Thanks!

Tr.debug(tc, "close, CLOSE_NON_UPGRADED_STREAMS");
}

// Save the remain upgrading and unread data into a VC's stateMap which will be consumed in the UpgradeInputByteBufferUtil.initialRead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be better to just say "Save the remaining unread data"? I'm not following what upgrading vs unread data is.

//If we encounter an exception here we need to return the 1 byte that we already have.
//Returned true immediately and the next read will catch the exception and propagate it properly
/*
* On a slow system/startup, data comes from the wire is faster than the channel can read/parse.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"On a slow system/startup, data comes from the wire faster than the channel can read/parse."

* On a slow system/startup, data comes from the wire is faster than the channel can read/parse.
* If so, data needs to be read from the prepared buffer (set during the first initialRead()) instead of the wire.
* This happens mainly on the very first POST.
* this method is called down from the application readListener onDataAvailable() read.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UpgradeHandler may not notify the application of the initial data.
4 participants