I assume you are referring to removing the singleton pattern, right? Because 
it's already everywhere :-)

Chris

Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
________________________________
From: 乔嘉林 <jialin.q...@timecho.com>
Sent: Wednesday, August 14, 2024 3:33:27 AM
To: dev@iotdb.apache.org <dev@iotdb.apache.org>
Subject: Re: [DISCUSS] Refactoring IoTDB to eliminate the singleton pattern

Hi,

+1 for adding singleton pattern and UTs

Jialin
> From: "Christofer Dutz"<christofer.d...@c-ware.de>
> Date:  Tue, Aug 13, 2024, 22:32
> Subject:  AW: [DISCUSS] Refactoring IoTDB to eliminate the singleton pattern
> To: "dev@iotdb.apache.org"<dev@iotdb.apache.org>
> Yeah … that’s what I’m proposing to do ;-)
>
> Make the stuff more easily testable and then also add tests for it.
>
> Chris
>
> Von: Xinyu Tan <tanxi...@apache.org>
> Datum: Dienstag, 13. August 2024 um 15:55
> An: dev@iotdb.apache.org <dev@iotdb.apache.org>
> Betreff: Re: [DISCUSS] Refactoring IoTDB to eliminate the singleton pattern
> Yes, but if we want to improve line-level test coverage, we do need to make 
> our code more testable, i.e. add more uts
>
> On 2024/08/07 07:08:34 Christofer Dutz wrote:
> > I should clarify,
> > This is the coverage from within the module itself. We definitely have more 
> > coverage when also running the integration test module, however none of the 
> > parts I recently touched seem to have had any form of tests.
> >
> > Chris
> >
> > Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
> > ________________________________
> > From: Xinyu Tan <tanxi...@apache.org>
> > Sent: Monday, August 5, 2024 11:43:24 AM
> > To: dev@iotdb.apache.org <dev@iotdb.apache.org>
> > Subject: Re: [DISCUSS] Refactoring IoTDB to eliminate the singleton pattern
> >
> > Hi, Chris
> >
> > I am shocked to see our class coverage and line coverage so low.
> >
> > I support making changes to our use of singletons to identify more issues 
> > in unit tests, reducing the likelihood of problems surfacing in integration 
> > tests, release testing, or even user environments.
> >
> > In the future, I also advocate prioritizing unit tests over integration 
> > tests when testing certain functionalities.
> >
> > My suggestion is to adopt a test-driven approach. We should first define 
> > some quantifiable and observable metrics, and then continuously refactor 
> > the singleton pattern while improving these metrics. This approach seems 
> > more sustainable.
> >
> > Best
> > -------------
> > Xinyu Tan
> >
> > On 2024/08/02 11:59:34 Christofer Dutz wrote:
> > > Hi all,
> > >
> > > So, one thing that has always been bothering me a bit with respect to the 
> > > IoTDB code-base, was the usage of the singleton pattern.
> > > Even if it simplifies composition of a project, it comes with quite some 
> > > severe disadvantages.
> > >
> > > In my last PR I tried refactoring the usage of singletons to make 
> > > components more unit-testable and I was quite happy with the results.
> > >
> > > I wrote up my ideas as well as some facts from fellow Apache projects.
> > >
> > > https://timechor.feishu.cn/docx/QLgZdJWgUoKBLSx1t3EcBJdRnud
> > >
> > > Please have a look and comment here. I would really like to start the 
> > > progress of refactoring IoTDB (At least with this approach it doesn’t 
> > > have to be an all-or-nothing big-bang type of refactoring, but instead 
> > > can happen over time).
> > >
> > > Chris
> > >
> >

Reply via email to