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

Split election drop stats to be either overflow or expired #3297

Merged
merged 12 commits into from
May 28, 2021

Conversation

MajorChump
Copy link
Contributor

At the moment it's not clear if elections are simply expiring after 5 minutes or being dropped due to the container overflowing. This should give us a better insight and allow us to monitor the situation.

clemahieu and others added 7 commits May 20, 2021 12:43
…redicate functions so identical logic can be checked in the condition_variable wait function and also inside the election_scheduler processing loop. This allows new predicates to be easily added and also eliminates risk of disjoin checks between the loop and the condition variable.
…scheduler::manual since the semantics of ::manual will be changed to not wait for vacancy before inserting.
… vacancy is not considered and elections are started for any blocks passed in.

- Moves responsibility for trimming down election count from active_transaction in to election_scheduler. This is done so that more advanced filling/spilling can be done by the election scheduler in the future.
- Erases from the active_transactions container by oldest transaction rather than by newest.
… vacancy is not considered and elections are started for any blocks passed in.

- Moves responsibility for trimming down election count from active_transaction in to election_scheduler. This is done so that more advanced filling/spilling can be done by the election scheduler in the future.
- Erases from the active_transactions container by oldest transaction rather than by newest.
theohax
theohax previously approved these changes May 21, 2021
Copy link
Contributor

@theohax theohax left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -330,6 +330,10 @@ void nano::active_transactions::request_confirm (nano::unique_lock<nano::mutex>
}

// Locks active mutex, cleans up the election and erases it from the main container
if (!election_l->confirmed ())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can it be confirmed_l ?

@clemahieu clemahieu force-pushed the election_scheduler_predicates branch 2 times, most recently from 0cf134b to e1d7025 Compare May 25, 2021 09:35
@MajorChump MajorChump changed the base branch from election_scheduler_predicates to develop May 27, 2021 12:07
@MajorChump MajorChump dismissed theohax’s stale review May 27, 2021 12:07

The base branch was changed.

@clemahieu clemahieu merged commit ebde1c8 into nanocurrency:develop May 28, 2021
clemahieu pushed a commit that referenced this pull request Jun 11, 2021
At the moment it's not clear if elections are simply expiring after 5 minutes or being dropped due to the container overflowing. This should give us a better insight and allow us to monitor the situation.
@zhyatt zhyatt added this to the V22.1 milestone Jun 22, 2021
@zhyatt zhyatt added the debug Updates assisting with debugging and development efforts label Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Updates assisting with debugging and development efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants