apache / apache/druid

Add MetadataSegmentManager.markSegmentsAsUnused(Iterable<String>) for batch marking segments as unused

Open
#7,859 0 comments 0 reactions 0 assignees View on GitHub
Area - Metadata Performance
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

There are two places in code where segments are marked unused one by one in a loop:

https://github.com/apache/incubator-druid/blob/c612ddc0f4a4588e97e94173638f8cda286f7c0c/server/src/main/java/org/apache/druid/server/coordinator/helper/DruidCoordinatorCleanupOvershadowed.java#L73-L80

https://github.com/apache/incubator-druid/blob/c612ddc0f4a4588e97e94173638f8cda286f7c0c/extensions-contrib/materialized-view-maintenance/src/main/java/org/apache/druid/indexing/materializedview/MaterializedViewSupervisor.java#L390-L395

Related to #7568.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the two cited loops in DruidCoordinatorCleanupOvershadowed.java and MaterializedViewSupervisor.java, then locate MetadataSegmentManager and review related issue #7568. Add the requested batch-marking entry point and update the two callers to use it; done means both existing one-by-one loops use the new operation and relevant tests pass.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.