SirMin commented on pull request #6359: URL: https://github.com/apache/shardingsphere/pull/6359#issuecomment-660766118
The current situation is that different threads are also returning different objects, and without looking at the source code, I subconsciously think that this should be the object held by the current thread in each call, rather than multiple calls will throw an exception. And after calling getInstance, you must call close or clear, otherwise an error will be reported. Is this design reasonable? Because under normal circumstances, closing or clearing should act on the resource, not on the method of obtaining the resource. And if clear is not called, the next call is affected. Is this design a bit coupled? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
