apache / apache/druid

A race condition in ConfigManager

Open
#6,940 1 comment 0 reactions 0 assignees View on GitHub
Bug stale
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

```java
// Multiple of these callables can be submitted at the same time, but the callables themselves
// are executed serially, so double check that it hasn't already been populated.
if (!watchedConfigs.containsKey(key)) {
byte[] value = dbConnector.lookup(configTable, "name", "payload", key);
ConfigHolder holder = new ConfigHolder(value, serde);
watchedConfigs.put(key, holder);
}
```

Contributor guide

Open the contributing guide

Research direction

Start by locating ConfigManager and the code around watchedConfigs, then trace how multiple callables reach the dbConnector lookup. Determine how concurrent calls can populate the same key more than once; done means the race is prevented without breaking configuration loading.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.