Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #9301 from EOSIO/revert-9098-resource-monitor-plugin
Browse files Browse the repository at this point in the history
Revert "Initial checkin of resource monior plugin"
  • Loading branch information
John DeBord authored Jul 9, 2020
2 parents 0303cd6 + f5e565a commit 75c53c6
Show file tree
Hide file tree
Showing 24 changed files with 4 additions and 1,417 deletions.
5 changes: 1 addition & 4 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,10 @@ struct controller_impl {

emit( self.irreversible_block, *bitr );

// blog.append could fail due to failures like running out of space.
// Do it before commit so that in case it throws, DB can be rolled back.
blog.append( (*bitr)->block );

db.commit( (*bitr)->block_num );
root_id = (*bitr)->id;

blog.append( (*bitr)->block );

auto rbitr = rbi.begin();
while( rbitr != rbi.end() && rbitr->blocknum <= (*bitr)->block_num ) {
Expand Down
1 change: 0 additions & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ add_subdirectory(history_plugin)
add_subdirectory(history_api_plugin)
add_subdirectory(state_history_plugin)
add_subdirectory(trace_api_plugin)
add_subdirectory(resource_monitor_plugin)

add_subdirectory(wallet_plugin)
add_subdirectory(wallet_api_plugin)
Expand Down
4 changes: 2 additions & 2 deletions plugins/chain_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ add_library( chain_plugin
chain_plugin.cpp
${HEADERS} )

target_link_libraries( chain_plugin eosio_chain appbase resource_monitor_plugin )
target_include_directories( chain_plugin PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/../chain_interface/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/appbase/include" "${CMAKE_CURRENT_SOURCE_DIR}/../resource_monitor_plugin/include")
target_link_libraries( chain_plugin eosio_chain appbase )
target_include_directories( chain_plugin PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/../chain_interface/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/appbase/include")
7 changes: 0 additions & 7 deletions plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

#include <eosio/chain/eosio_contract.hpp>

#include <eosio/resource_monitor_plugin/resource_monitor_plugin.hpp>

#include <chainbase/environment.hpp>

#include <boost/signals2/connection.hpp>
Expand Down Expand Up @@ -738,11 +736,6 @@ void chain_plugin::plugin_initialize(const variables_map& options) {
my->chain_config->state_dir = app().data_dir() / config::default_state_dir_name;
my->chain_config->read_only = my->readonly;

if (auto resmon_plugin = app().find_plugin<resource_monitor_plugin>()) {
resmon_plugin->monitor_directory(my->chain_config->blocks_dir);
resmon_plugin->monitor_directory(my->chain_config->state_dir);
}

if( options.count( "chain-state-db-size-mb" ))
my->chain_config->state_size = options.at( "chain-state-db-size-mb" ).as<uint64_t>() * 1024 * 1024;

Expand Down
5 changes: 0 additions & 5 deletions plugins/producer_plugin/producer_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <eosio/chain/transaction_object.hpp>
#include <eosio/chain/thread_utils.hpp>
#include <eosio/chain/unapplied_transaction_queue.hpp>
#include <eosio/resource_monitor_plugin/resource_monitor_plugin.hpp>

#include <fc/io/json.hpp>
#include <fc/log/logger_config.hpp>
Expand Down Expand Up @@ -929,10 +928,6 @@ void producer_plugin::plugin_initialize(const boost::program_options::variables_

EOS_ASSERT( fc::is_directory(my->_snapshots_dir), snapshot_directory_not_found_exception,
"No such directory '${dir}'", ("dir", my->_snapshots_dir.generic_string()) );

if (auto resmon_plugin = app().find_plugin<resource_monitor_plugin>()) {
resmon_plugin->monitor_directory(my->_snapshots_dir);
}
}

my->_incoming_block_subscription = app().get_channel<incoming::channels::block>().subscribe(
Expand Down
11 changes: 0 additions & 11 deletions plugins/resource_monitor_plugin/CMakeLists.txt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 75c53c6

Please sign in to comment.