Repository navigation
[pull] main from apache:main - #13
Merged
Merged
Conversation
…dd contract test (#677) Wrap the List arg in new ArrayList<>() in the constructors of the events that user code instantiates directly: ChatRequestEvent (messages) and ContextRetrievalResponseEvent (documents). This avoids the JDK 17+ Kryo InaccessibleObjectException when callers pass List.of(...) or any other ImmutableCollections instance. ToolRequestEvent / ToolResponseEvent are intentionally not changed - they are produced only by built-in framework actions, never by user code, so adding defensive copies there only adds overhead. (And shallow copies wouldn't help anyway: tool-call payloads can carry nested Map.of(...).) EventKryoSerializationTest in the e2e integration module asserts the defensive-copy contract directly: the stored collection must be mutable. Two tests, one per affected event. Co-authored-by: Avichay Marciano <avichaym@amazon.com>
When a JavaCollectionManageableVectorStore wraps a Java vector store backed by a Python embedding model, the previous flow delegated query/ add/update to the Java side, which then called the embedding model from Java. For a PYTHON-backed embedding model that callback is a Java→Python re-entry on the Flink operator thread, and pemja's sub-interpreter state on that thread ends up corrupted; the next pemja conversion in the same thread crashes inside JcpPyDecimal_Check → PyImport_ImportModule with a NULL sys.modules dereference. Drop the add/query/update overrides in JavaVectorStoreImpl and inherit BaseVectorStore's canonical flow: embed in Python first, then make a single-direction Python→Java call to addEmbedding/queryEmbedding/ updateEmbedding. open() now also chains super().open() so the embedding model resolves from string to instance before the Python embed step runs. fromPythonVectorStoreQuery (its only caller is gone) and the matching python_java_utils helpers (get_mode_value, from_java_vector_store_query_result) are removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )