Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix occupied core handling #4691

Merged
merged 14 commits into from
Jun 7, 2024
Merged

Fix occupied core handling #4691

merged 14 commits into from
Jun 7, 2024

Conversation

eskimor
Copy link
Member

@eskimor eskimor commented Jun 4, 2024

No description provided.

@eskimor eskimor added the T8-polkadot This PR/Issue is related to/affects the Polkadot network. label Jun 4, 2024
Copy link
Contributor

@sandreim sandreim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

polkadot/runtime/parachains/src/scheduler.rs Show resolved Hide resolved
prdoc/pr_4691.prdoc Outdated Show resolved Hide resolved
Copy link
Contributor

@alindima alindima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a couple of questions/suggestions

polkadot/runtime/parachains/src/scheduler.rs Outdated Show resolved Hide resolved
polkadot/runtime/parachains/src/scheduler.rs Outdated Show resolved Hide resolved
queue: Peekable<btree_map::IntoIter<CoreIndex, VecDeque<E>>>,
}

impl<E> Iterator for ClaimQueueIterator<E> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: IMHO it would have been easier to comprehend and code if instead of this custom iterator we'd just loop over the availability cores and try fetching the claimqueue for that core (in fn eligible_paras). still, this iterator has the slight advantage that when zipped with the av-cores, it'll stop at the end of the claim queue and not go further. feel free to ignore

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it allows for returning an iterator, otherwise you would return a closure with a reference that won't live long enough.

@eskimor eskimor enabled auto-merge June 7, 2024 10:25
@eskimor eskimor added this pull request to the merge queue Jun 7, 2024
Merged via the queue into master with commit 9dfe0fe Jun 7, 2024
155 of 157 checks passed
@eskimor eskimor deleted the rk-correct-claimqueue-size branch June 7, 2024 11:16
ordian added a commit that referenced this pull request Jun 13, 2024
* master: (29 commits)
  Append overlay optimization. (#1223)
  finalization: Skip tree route calculation if no forks present (#4721)
  Remove unncessary call remove_from_peers_set (#4742)
  add pov-recovery unit tests and support for elastic scaling (#4733)
  approval-voting: Add no shows debug information (#4726)
  Revamp the Readme of the parachain template (#4713)
  Update README.md to move the PSVM link under a "Tooling" section under the "Releases" section (#4734)
  frame/proc-macro: Refactor code for better readability (#4712)
  Contracts:  update wasmi to 0.32 (#3679)
  Backport style changes from P<>K bridge to R<>W bridge (#4732)
  New reference doc for Custom RPC V2 (#4654)
  Frame Pallets: Clean a lot of test setups (#4642)
  Fix occupied core handling (#4691)
  statement-distribution: Fix false warning (#4727)
  Update the README to include a link to the Polkadot SDK Version Manager (#4718)
  Cleanup PVF artifact by cache limit and stale time (#4662)
  Update link to a latest polkadot release (#4711)
  [CI] Delete cargo-deny config (#4677)
  fix build on MacOS: bump secp256k1 and secp256k1-sys to patched versions (#4709)
  Unify dependency aliases (#4633)
  ...
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
Co-authored-by: eskimor <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants