HuangFru opened a new issue, #3804: URL: https://github.com/apache/amoro/issues/3804
### What happened? When creating a `TableMetaStore` with a configuration, `getRuntimeContext` will create a `RuntimeContext `and store it in `RUNTIME_CONTEXT_CACHE`, where the key is the `TableMetaStore` itself: <img width="1246" height="358" alt="Image" src="https://github.com/user-attachments/assets/64a8145e-7c39-43e8-ad80-2bc9eaeb3463" /> However, let's look at the overridden equals method of `TableMetaStore`: <img width="1540" height="1404" alt="Image" src="https://github.com/user-attachments/assets/15bb0ff0-619a-4143-9fcb-b8eec86a88b6" /> It does not use the configuration, and all these fields are null. That is to say, if there is another `TableMetaStore `built with another configuration, they are essentially different, but the equals method will consider them the same. At this point, when the second created `TableMetaStore` retrieves the `RuntimeContext` of the previous `TableMetaStore` from `RUNTIME_CONTEXT_CACHE` via getRuntimeContext, it will overwrite the configuration in the `RuntimeContext` of the previous one. This may not only cause the issue of the configuration being overwritten, but also potentially lead to other problems. ### Affects Versions master ### What table formats are you seeing the problem on? _No response_ ### What engines are you seeing the problem on? _No response_ ### How to reproduce I discovered this risk while attempting to make some custom modifications to Amoro, but it hasn't caused any actual problems. ### Relevant log output ```shell ``` ### Anything else _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's Code of Conduct -- 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]
