[Bugfix] Implement skipsDeserialization() in RestoringTransportResponseHandler#6154
Conversation
PR Reviewer Guide 🔍(Review updated until commit 2de4fad)Here are some key observations to aid the review process:
|
0f991d3 to
aea5480
Compare
|
Persistent review updated to latest commit aea5480 |
|
TY @finnegancarroll, do you think we should consider adding a test like https://github.com/opensearch-project/security/blob/main/src/test/java/org/opensearch/security/filter/DelegatingRestHandlerTests.java to ensure that all default methods from the interface are properly overridden? |
inner transport response handler but does not forward the skipsDeserialization() method. This causes the Arrow Flight stream transport to fall back to byte serialization for responses that should use zero-copy Arrow vector transfer. Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
aea5480 to
7ad6d7c
Compare
|
good idea @cwperks , added a unit test to compare the wrapped / non wrapped interfaces & output. |
|
Persistent review updated to latest commit 7ad6d7c |
Signed-off-by: Finn Carroll <carrofin@amazon.com>
|
Persistent review updated to latest commit 2de4fad |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6154 +/- ##
==========================================
+ Coverage 74.97% 75.01% +0.03%
==========================================
Files 453 452 -1
Lines 29112 29107 -5
Branches 4386 4382 -4
==========================================
+ Hits 21828 21835 +7
+ Misses 5257 5245 -12
Partials 2027 2027
🚀 New features to boost your workflow:
|
324a038
into
opensearch-project:main
…seHandler (opensearch-project#6154) Signed-off-by: Finn Carroll <carrofin@amazon.com> Signed-off-by: Terry Quigley <terry.quigley@sas.com>
Description
The security interceptor's RestoringTransportResponseHandler wraps the inner transport response handler but does not forward the
skipsDeserialization()method which was added in a recent upstream core change.This results in a mismatch between the client and server configurations, the client sending payloads over the stream has
skipsDeserialization() = truewhile the response handling side seesskipsDeserialization() = falsedue to the default value in theRestoringTransportResponseHandlerinterface, and unknowingly opens theVectorStreamInput.forByteSerializedstream input to handle the response.This causes the Arrow Flight stream transport responses to throw the following exception:
Issues Resolved
N/A
Testing
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.