Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOTDB-3012][De-Singleton-1] remove singleton pattern for some classes #5672

Merged
merged 2 commits into from Apr 26, 2022

Conversation

chengjianyun
Copy link
Contributor

@chengjianyun chengjianyun commented Apr 26, 2022

As have discussed, singleton pattern is making code inflexible, hard to make UI and IT tests. We shouldn't use singleton pattern too much.

I'd like to propose several PRs to remove the singleton pattern for most of singleton pattern implementations before the getInstance() are widely used. This one is the first.

@wangchao316 wangchao316 changed the title [De-Singleton-1] remove singleton pattern for some classes [IOTDB-3012] remove singleton pattern for some classes Apr 26, 2022
@chengjianyun chengjianyun changed the title [IOTDB-3012] remove singleton pattern for some classes [IOTDB-3012][De-Singleton-1] remove singleton pattern for some classes Apr 26, 2022
Copy link
Member

@wangchao316 wangchao316 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Apr 26, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 55 Code Smells

77.6% 77.6% Coverage
0.0% 0.0% Duplication

@JackieTien97 JackieTien97 merged commit 506b515 into master Apr 26, 2022
@JackieTien97 JackieTien97 deleted the jianyun/de-singleton branch April 26, 2022 11:25
xinzhongtianxia added a commit to xinzhongtianxia/iotdb that referenced this pull request Apr 27, 2022
* remotes/upstream/master:
  Update dbeaver user guide (apache#5675)
  [IOTDB-3012][De-Singleton-1] remove singleton pattern for some classes (apache#5672)
  [IOTDB-3000] ConfigNode supports MTreeAboveSG (apache#5670)
  [IOTDB-2803]fix some UT code smell and refine plannode serialize (apache#5667)
  [IOTDB-3003] data sync pipe recover bug & other issues (apache#5665)
  Use logical clock to fix clientManager test (apache#5671)
  extract interface from path (apache#5662)
  Implement MultiColumnMerger to support querying data of one timeseries distributed on different DataNodes (apache#5663)
  [IOTDB-2845] Implementation of DeviceViewOperator Part1 (apache#5613)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants