refactor/fix post unmarshal#801
Merged
Merged
Conversation
ngmr
commented
Jun 5, 2026
Member
- refactor(yoko-core): defer portable interceptor invocation until first read
- refactor(interceptors): add post_marshal interception point for thread-local cleanup
- refactor(util): consolidate thread-local handling with unified stack pattern
587ad6e to
326a412
Compare
…t read - Changed DowncallStub.invoke() to return WrappedReplyInputStream instead of calling postUnmarshal() immediately - Created WrappedReplyInputStream wrapper that intercepts first read operation to trigger interceptors - Ensures interceptors are called AFTER stub unmarshals first value, making result available to interceptors - Properly reports unmarshalling exceptions via receive_exception interception point - Updated CmsfTest, RoflTest, and YasfTest to reflect new behavior where thread-local options are set during unmarshalling - Lines added: 192, lines removed: 24 Co-authored-by: Joe Chacko <chackoj@uk.ibm.com> Co-authored-by-AI: IBM Bob 1.0.4
…d-local cleanup - Added ExtendedServerRequestInterceptor.post_marshal() method to clean up thread-local state after response marshalling - Added default implementations for all ExtendedServerRequestInterceptor methods to reduce boilerplate - Updated PIManager.serverPostMarshal() to invoke post_marshal on extended interceptors - Modified PIUpcall.postMarshal() to call piManager_.serverPostMarshal() before super.postMarshal() - Updated ServerRequestInfo_impl._OB_postMarshal() to call post_marshal on extended interceptors with CMSF/YASF override context - Refactored YasfServerInterceptor to use post_marshal for cleanup instead of send_reply/send_exception/send_other - Refactored RoflServerInterceptor to use post_marshal for cleanup instead of send_reply/send_exception/send_other - Refactored CmsfServerInterceptor to use post_marshal for cleanup instead of setupCmsfThreadLocalValue in send methods - Modernized ThreadLocal initialization in CmsfThreadLocal and YasfThreadLocal to use withInitial() - Fixed YasfTest.Echo interface visibility to public - Substantive lines added: 152, lines removed: 65 This fixes the YasfTest failure where YASF thread-local state was not properly available during serialization. The new post_marshal interception point ensures thread-local state is cleaned up after marshalling completes, matching the lifecycle established by pre_unmarshal for setup after context switches. Co-authored-by-AI: IBM Bob 1.0.4
326a412 to
9dce32a
Compare
…pattern - Introduced ThreadLocalStack utility class to replace individual ThreadLocal implementations - Removed CmsfThreadLocal, RoflThreadLocal, and YasfThreadLocal in favor of unified ThreadLocalStack approach - Introduced InfoWrangler base class for reading and writing various info types - Created specialized wranglers (CmsfWrangler, YasfWrangler) for managing protocol-specific operations - Deleted CmsfVersion and YasfHelper classes, consolidating functionality into wranglers - Updated all interceptors (CMSF, ROFL, YASF) to use new wrangler pattern with ThreadLocalStack - Modified RMI ObjectWriter and FieldDescriptor to integrate with new thread-local management - Updated ServerRequestInfo_impl and ClientRequestInfo_impl to use YASF_THREAD_LOCAL and CMSF_THREAD_LOCAL constants - Enhanced OrbSteward in testify-iiop to support new pattern - Updated all related tests to use new API - Substantive lines added: 722, lines removed: 774 Co-authored-by-AI: IBM Bob 1.0.4
9dce32a to
97f2476
Compare
joe-chacko
approved these changes
Jun 5, 2026
joe-chacko
left a comment
Member
There was a problem hiding this comment.
I like what you've done here…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.