[4.0 -> 5.0] hardening resource monitor manager plugin shutdown handling#1783
Merged
linh2931 merged 7 commits intorelease/5.0from Oct 17, 2023
Merged
[4.0 -> 5.0] hardening resource monitor manager plugin shutdown handling#1783linh2931 merged 7 commits intorelease/5.0from
linh2931 merged 7 commits intorelease/5.0from
Conversation
Those tests were intended to verify the duration of space_monitor_loop. In essence they tested Boost's expires_from_noa, which was not necessary. The tests themselves were hacky and took uncessary 50 seconds.
* removes unnecessary check of info logging "Creating and st arting monitor thread" * reduces time to wait for nodeos startup from 120 seconds to 10 seconds
* no need to call cancel timer explicitly. * no need to use mutex for timer as when timer is used on the main thread, resource monitor thread has already stopped.
…ning [4.0] hardening resource monitor manager plugin shutdown handling
…ix_to_5_0 Resolved merge conflicts
heifner
approved these changes
Oct 17, 2023
spoonincode
approved these changes
Oct 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1485 reports occasional resource manager plugin test failures. The failure is shown as
/__w/leap/leap/plugins/resource_monitor_plugin/test/test_resmon_plugin.cpp(147): fatal error: in "resmon_plugin_tests/startupNormal": unexpected exception thrown by plugin_startup({"/tmp"})without any other additional information.
Further investigation reveals the scheduled monitor timer task is not cancelled during plugin shutdown and currently monitor task might be still running before the thread exits. This PR hardens the plugin shutdown process.
Merges
release/4.0intorelease/5.0including #1774Resolves #1485