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

core: use nodes in stdcm priority queue and replace weight by clear comparison #7830

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

Erashin
Copy link
Contributor

@Erashin Erashin commented Jun 24, 2024

Fixes #7581 and #7582.

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.67%. Comparing base (22d010d) to head (5acf0be).
Report is 25 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #7830      +/-   ##
============================================
+ Coverage     28.65%   28.67%   +0.02%     
- Complexity     2058     2059       +1     
============================================
  Files          1247     1249       +2     
  Lines        154280   154443     +163     
  Branches       3031     3040       +9     
============================================
+ Hits          44202    44292      +90     
- Misses       108276   108337      +61     
- Partials       1802     1814      +12     
Flag Coverage Δ
core 75.01% <100.00%> (-0.01%) ⬇️
editoast 71.99% <ø> (+0.14%) ⬆️
front 10.01% <ø> (+<0.01%) ⬆️
gateway 2.34% <ø> (-0.07%) ⬇️
railjson_generator 87.49% <ø> (ø)
tests 73.16% <ø> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Erashin Erashin force-pushed the alch/nodes-in-stdcm-prio-queue branch from b7608f1 to d9b6616 Compare June 24, 2024 13:42
@eckter
Copy link
Contributor

eckter commented Jun 25, 2024

TBD: probably a regression on potentially infinite remaining time (use max with max running time). Also not sure about the default value to 0.0 in STDCMNode.remainingTime, could actually be Double.Infinity.

Exiting early should be mostly straightforward, like if (node.timeSinceDeparture + node.remainingTimeEstimation > maxRunTime) return null just after getting a node. We don't have the time since departure yet, but we already need to add it for other reasons

Also not sure about the default value to 0.0 in STDCMNode.remainingTime, could actually be Double.Infinity.

We shouldn't have no value there. Ideally there shouldn't be any default value, or null if we can't have it when initializing (with !! when getting the value).

If we do want a default value, it should be optimistic (i.e. 0)

@Erashin Erashin force-pushed the alch/nodes-in-stdcm-prio-queue branch 2 times, most recently from 7279f4b to d59bbae Compare June 26, 2024 06:59
@Erashin Erashin marked this pull request as ready for review June 26, 2024 07:15
@Erashin Erashin requested a review from a team as a code owner June 26, 2024 07:15
@Erashin Erashin requested a review from eckter June 26, 2024 07:15
@Erashin Erashin force-pushed the alch/nodes-in-stdcm-prio-queue branch from 7f98e70 to 96b8f78 Compare June 26, 2024 12:38
@Erashin Erashin force-pushed the alch/nodes-in-stdcm-prio-queue branch 2 times, most recently from 96b8f78 to b707c85 Compare June 27, 2024 06:34
@Erashin Erashin requested a review from eckter June 27, 2024 06:37
@Erashin Erashin force-pushed the alch/nodes-in-stdcm-prio-queue branch 2 times, most recently from 4b4c007 to 8fd189f Compare June 27, 2024 07:35
@Erashin Erashin force-pushed the alch/nodes-in-stdcm-prio-queue branch from 8fd189f to 5acf0be Compare June 27, 2024 07:35
@Erashin Erashin added this pull request to the merge queue Jun 27, 2024
Merged via the queue into dev with commit f39a86d Jun 27, 2024
17 checks passed
@Erashin Erashin deleted the alch/nodes-in-stdcm-prio-queue branch June 27, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants