Thinking more about this, I think the best approach would be to identify the singletons … identify their relations … refactor the ones with the least dependencies first. Then to work ourselves down to DataNode and ConfigNode.
Chris Von: Christofer Dutz <christofer.d...@c-ware.de> Datum: Dienstag, 20. August 2024 um 15:10 An: dev@iotdb.apache.org <dev@iotdb.apache.org> Betreff: [DISCUSS] Starting to implement the "away from singletons" transition? Hi all, I have just finished the first PR after we had the discussion about generally moving away from singletons a few days ago. Unfortunately, the first PR I had to deal with was refactoring, so I did this for DataNode and ConfigNode, which are the heart and the glue-code of the Data node and Config node. While for the ConfigNode refatoring there were no issues, for the DataNode there were isssues related in initializing things in the wrong order. So, my initial approach didn’t work for DataNode and I undid this. I guess for both DataNode as well as ConfigNode (and in the Future AiNode) it would genereally make more sense to manually create the instances and weave the application. So now my question to you: Should I also undo my Singleton-changes for the ConfigNode in this PR: https://github.com/apache/iotdb/pull/13194/files#diff-3a715a0e8500c37dd803c5644ee6e7e4ce988fc4d578658b0ea75287ed03f924R116 I’m quite indifferent about it as long as in long term we get rid of the singletons. Chris