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

  129 files  ± 0    129 suites  ±0   39m 26s ⏱️ + 4m 24s
3 521 tests  -  6  3 467 ✅ +34   54 💤 ±0  0 ❌  - 40 
9 366 runs   - 18  9 236 ✅ +22  130 💤 ±0  0 ❌  - 40 

Results for commit 2b88b3f. ± Comparison against base commit 8fbf102.

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.

@HannesWell

Copy link
Copy Markdown
Member

@laeubi do you have remarks on this, since you requested the changes in #2363 (comment)?

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 4769290 to 2b88b3f Compare June 30, 2026 09:49
@vogella

vogella commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Any additional feedback here?

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.

2 participants