apache / apache/iotdb

Define a constant instead of duplicating this literal "total" 8 times.

Open
#7,013 5 comments 0 reactions 0 assignees View on GitHub
Easy-Fixed
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

Code Path:confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManagerMetrics.java
1660630501280
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Contributor guide

Open the contributing guide

Research direction

Open confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManagerMetrics.java and locate the eight duplicated "total" literals. Define one constant and use it for those references; done means the literal is no longer duplicated there and the existing behavior is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.