apache / apache/accumulo

MetadataLocationObtainer has undocumented confusing behavior

Open
#3,072 1 comment 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

While reviewing #2861, I noticed that the `more` field wasn't really used for much. It was just used for one additional lookup. However, the value of `more` was never assigned again. It looked like this was originally supposed to be part of a loop and the `more` value being true kept it in the loop. However, looking at this code further, I can't tell what any of it is doing. It looks like the `if` should be a `while` loop, but this is not clear. Perhaps only one additional lookup needs to be done if `more` is true, but there are no comments explaining why this would be the case, and it's not obvious to me. Some comments in here would be really nice, and if there is a bug and this should be a loop, that should be fixed.

https://github.com/apache/accumulo/blob/6d3aeccd8e86853bb8cf88b7590673787e127d0a/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java#L114-L123

Contributor guide

Open the contributing guide

Research direction

Read core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java around lines 114-123, then compare the behavior with the context from issue #2861. Determine why `more` is used for the additional lookup and whether one lookup or repeated looping is intended. Done means the behavior is explained with comments, or the behavior is corrected if the investigation confirms a bug.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, distributed-systems
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.