Totally agreed.

Removing all singletons is the ultimate and idea solution, but as long as there 
is one singleton, I am afraid that the whole parallel test idea may get blocked.


Referring to the previous topic mentioning a plugin that prevents parallel 
compilation,
I wonder if there is an annotation or something that may help us tell the 
surefire framework which tests can be run in parallel.
If so, we can add such annotations, maybe through AI.


By the way, I doubt if unit tests is a major component of CI time. 
As long as I can remember, we spent most of the time on integration tests, 
especially pipe-related ones.
They does not seem to be bothered by singletons, since they start IoTDB 
instances in other processes.


Best,
Tian Jiang


---- Replied Message ----
| From | Christofer Dutz<[email protected]> |
| Date | 2/12/2026 17:17 |
| To | [email protected]<[email protected]> |
| Subject | Performance improvements in the build? |
Hi all,

So yesterday I took the opportunity to update my private fork, where I do all 
the stuff that the community doesn’t want (Like updating from JavaX to Jakarta 
and other things).
More modern Java versions output this every time a new VM is started:
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

And I’m getting this before every test.

Spinning up a new VM for every test is very expensive. It also feels as if the 
entire build has become a lot slower over the last year (mostly related to 
test-execution time)
I know why this is the case:
Our usage of the Singleton pattern everywhere in the code-base makes it 
impossible to run multiple tests in parallel within the same Java VM.

Also does it seem the datanode module if getting fatter and fatter. Just 
noticed the OPC-UA and OPC-DA support (because I had to migrate OPC-UA to milo 
1.x in order to support Jakarta).

We really should stop simply adding stuff to that module that has always been a 
mono-repo within a multi-repo. Is this where the whole external-api thing is 
heading?

I still firmly believe that IoTDB would greatly benefit of:

  *
A major refactoring, getting rid of the singletons and hereby allowing 
concurrent test runs within the same VM
  *
Another major refactoring, pulling out everything that’s not directly datanode 
code into a plugin system

Just my thoughts after seeing what’s happened over the last 6 months or so.

Chris

Reply via email to