Skip to content

Deduplicate classpath update requests at enqueue time#2366

Open
vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:dedup-at-enqueue
Open

Deduplicate classpath update requests at enqueue time#2366
vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:dedup-at-enqueue

Conversation

@vogella

@vogella vogella commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2363, addressing the review feedback from @laeubi. The work queue of UpdateClasspathsJob is now a map keyed by project, so requests for the same project are merged when they are added rather than while draining the queue. The deduplication is thereby enforced by the data structure itself. This lets UpdateRequest become private again and removes the drainRequests helper that was public only for testing, together with the isolated unit tests for it.

@vogella vogella requested a review from laeubi June 11, 2026 17:58
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

Test Results

  126 files  ± 0    126 suites  ±0   37m 47s ⏱️ - 1m 2s
3 510 tests  -  6  3 456 ✅  -  6   54 💤 ±0  0 ❌ ±0 
9 333 runs   - 18  9 203 ✅  - 18  130 💤 ±0  0 ❌ ±0 

Results for commit ab04c78. ± Comparison against base commit d0a78c5.

This pull request removes 6 tests.
org.eclipse.pde.ui.tests.classpathupdater.ClasspathContainerStateTest ‑ deduplicatesRequestsForSameProject
org.eclipse.pde.ui.tests.classpathupdater.ClasspathContainerStateTest ‑ drainsAllRequestsAndPreservesOrder
org.eclipse.pde.ui.tests.classpathupdater.ClasspathContainerStateTest ‑ emptyQueueYieldsNoRequests
org.eclipse.pde.ui.tests.classpathupdater.ClasspathContainerStateTest ‑ latestSavedStateWins
org.eclipse.pde.ui.tests.classpathupdater.ClasspathContainerStateTest ‑ requestWithoutSavedStateWinsOverEarlierSavedState
org.eclipse.pde.ui.tests.classpathupdater.ClasspathContainerStateTest ‑ requestWithoutSavedStateWinsOverLaterSavedState

♻️ This comment has been updated with latest results.

Replace the work queue of UpdateClasspathsJob with a map keyed by
project so that deduplication happens structurally when a request is
added instead of while draining the queue. This allows UpdateRequest to
become private again and removes the drainRequests helper that was made
public only for testing, together with the isolated unit tests for it.

Addresses review feedback in
eclipse-pde#2363
@vogella vogella force-pushed the dedup-at-enqueue branch from b0d7e41 to ab04c78 Compare June 12, 2026 19:52
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