pwrliang opened a new pull request, #717: URL: https://github.com/apache/sedona-db/pull/717
This PR addresses a thread-safety issue in `RTSpatialRefiner` that occurs during concurrent execution. ### The Problem: Race Conditions in Schema Initialization In the original design, the `init_schema` method was responsible for initializing the `ArrowArrayView` for both the **build** and **stream** sides. When `RTSpatialRefiner` is invoked across multiple threads, the shared state within the stream-side `ArrowArrayView` is modified concurrently. This leads to a race condition where threads overwrite or corrupt the view, resulting in undefined behavior during spatial refinement. ### Fix ### In this PR, the `init_schema` is replaced with `init_build_schema`. In the `CRefine` method, the caller is required to pass a schema for the stream side to create a local `ArrowArrayView` object. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
