Skip to content

Fix NamespaceSet.clear() fires del-hook once per item not per backend#515

Open
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
rwth-iat:fix/b4-namespaceset-clear-hook
Open

Fix NamespaceSet.clear() fires del-hook once per item not per backend#515
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
rwth-iat:fix/b4-namespaceset-clear-hook

Conversation

@zrgt
Copy link
Copy Markdown
Contributor

@zrgt zrgt commented May 5, 2026

Summary

NamespaceSet.clear() iterated all backends and called _execute_item_del_hook for each item in each backend. With M backends and N items this fired M×N hook calls instead of N.

Fix collects items from first backend only, fires hook once per item, then clears all backends.

Fixes #497

Test plan

  • test_namespaceset_clear_hook_called_once_per_item — 2 items + 2 backends → exactly 2 hook calls
  • Full test.model.test_base suite passes (53 tests)

clear() iterated all backends firing _execute_item_del_hook for each,
resulting in N*M calls (N items, M backends) instead of N.
Fix collects items from first backend only before firing hooks.

Fixes eclipse-basyx#497
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