Skip to content

FELIX-6895: Serialize ComponentScheduler.remove() with bind() - #615

Open
pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6895
Open

pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6895

Conversation

@pderop

@pderop pderop commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Motivation:

When the "org.apache.felix.dependencymanager.parallel" property is set, components are kept pending until a ComponentExecutorFactory is bound. remove() was not serialized with bind(): a component removed while bind() was processing it was started afterwards, and stayed started.

Modification:

Run remove() in the same serial executor as add() and bind(), and wait for its completion, so that remove() still returns once the component is stopped.

Result:

A component removed while a ComponentExecutorFactory is being bound is stopped when remove() returns, and is no longer left started.

Motivation:

When the "org.apache.felix.dependencymanager.parallel" property is set,
components are kept pending until a ComponentExecutorFactory is bound.
remove() was not serialized with bind(): a component removed while bind()
was processing it was started afterwards, and stayed started.

Modification:

Run remove() in the same serial executor as add() and bind(), and wait
for its completion, so that remove() still returns once the component is
stopped.

Result:

A component removed while a ComponentExecutorFactory is being bound is
stopped when remove() returns, and is no longer left started.
@pderop pderop self-assigned this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant