apache / apache/accumulo

fixed properties set is not maintainable

Open
#5,693 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
1.2k
Forks
487
Avg merge
4d 5h
Merged PRs (30d)
13

Description

**Is your feature request related to a problem? Please describe.**
The FIXED_PROPERTIES set in the Property class is not maintainable. #5632 greatly increased the size of this set when exploring all properties to determine if they are fixed or not. This demonstrates that this set is not always considered when adding new properties (and/or existing properties weren't all considered when this set was created).

**Describe the solution you'd like**
Property should have a new field `isFixed` and the Property constructor should take this argument.
This will force `isFixed` to be considered when adding new properties.

This field should be an enum IS_FIXED, NOT_FIXED for clarity.

**Describe alternatives you've considered**
A potential alternative or temporary solution could be to add a test to PropertyTest which fails whenever new properties are added, prompting developers to consider if the property they added should be added to FIXED_PROPERTIES. Developers could then update the test after consideration.

This change should target 4.0.0, however the alternative solution could target 2.1

So, the approach to fix this issue could be:
* The new test in PropertyTest in 2.1 and main
* The new `isFixed` field in main, can remove the test in main with this change

Contributor guide

Open the contributing guide

Research direction

Start by reading the Property class and PropertyTest, then trace the Property constructor and the existing FIXED_PROPERTIES set across the project. Compare the proposed enum values and the alternative test approach against the 2.1 and main branches. Done means fixed status is explicitly handled for every property, with corresponding tests and no maintainability gap when new properties are added.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.