diff options
author | Sumant Tambe <sutambe@users.noreply.github.com> | 2010-08-21 23:19:40 +0000 |
---|---|---|
committer | Sumant Tambe <sutambe@users.noreply.github.com> | 2010-08-21 23:19:40 +0000 |
commit | 5840b75f1b2d701c6d26fef8d31e36db17ecda80 (patch) | |
tree | 306aa6111ecc0b8b55e600db34b219018ecb46f7 | |
parent | 484377269d955a7261279c80640ed758f6a4170f (diff) | |
download | ATCD-5840b75f1b2d701c6d26fef8d31e36db17ecda80.tar.gz |
Sat Aug 21 23:20:05 UTC 2010 Sumant Tambe <sutambe@nospam>
-rw-r--r-- | CIAO/ChangeLog | 11 | ||||
-rw-r--r-- | CIAO/DAnCE/tests/CIAO/FTComponents/FTClient_Timer_Handler.cpp | 29 | ||||
-rw-r--r-- | CIAO/DAnCE/tests/CIAO/FTComponents/FTComponents.mpc | 10 | ||||
-rw-r--r-- | CIAO/DAnCE/tests/CIAO/FTComponents/FTTask.idl | 2 | ||||
-rw-r--r-- | CIAO/DAnCE/tests/CIAO/FTComponents/FTTask_exec.cpp | 37 |
5 files changed, 60 insertions, 29 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 1b2126a6b8a..2c4d0353be0 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,12 @@ +Sat Aug 21 23:20:05 UTC 2010 Sumant Tambe <sutambe@nospam> + + * DAnCE/tests/CIAO/FTComponents/FTClient_Timer_Handler.cpp: + * DAnCE/tests/CIAO/FTComponents/FTComponents.mpc: + * DAnCE/tests/CIAO/FTComponents/FTTask.idl: + * DAnCE/tests/CIAO/FTComponents/FTTask_exec.cpp: + + Improved group failover support using lag-by-one approach. + Thu Aug 12 22:10:02 UTC 2010 Sumant Tambe <sutambe@nospam> * DAnCE/FaultCorrelationManager/FaultCorrelationManager_Impl.h: @@ -14,7 +23,7 @@ Thu Aug 12 22:10:02 UTC 2010 Sumant Tambe <sutambe@nospam> * DAnCE/tests/CIAO/FTComponents/client_trigger.cpp: The changes above are related to CORFU experiments and - GroupFailover two phase commit implementation. + GroupFailover two phase commit implementation. The changes below are not related to it. * ciao/ComponentServer/Configurators/Configurators.mpc: diff --git a/CIAO/DAnCE/tests/CIAO/FTComponents/FTClient_Timer_Handler.cpp b/CIAO/DAnCE/tests/CIAO/FTComponents/FTClient_Timer_Handler.cpp index 10568a21d6a..7ee2e42be43 100644 --- a/CIAO/DAnCE/tests/CIAO/FTComponents/FTClient_Timer_Handler.cpp +++ b/CIAO/DAnCE/tests/CIAO/FTComponents/FTClient_Timer_Handler.cpp @@ -85,11 +85,18 @@ namespace CIDL_FTClient_Impl server_processing_time.msec ( server_->run_task (client_executor_->execution_time ())); - rm_->finish_invocation(CORBA::string_dup(server_name_.c_str())); - CIAO_DEBUG ((LM_EMERGENCY, - "FTClient_Timer_Handler::handle_timeout () - " - "Completed run_task\n")); + if(rm_->finish_invocation( + CORBA::string_dup(client_executor_->name ()), 2, 0)) + { + std::cerr << "FTClient_Timer_Handler::handle_timeout(): " + << "finish_invocation successful." << std::endl; + } + else + { + std::cerr << "FTClient_Timer_Handler::handle_timeout(): " + << "finish_invocation failed." << std::endl; + } timer_.stop (); ACE_Time_Value rt; @@ -144,14 +151,24 @@ namespace CIDL_FTClient_Impl std::cout << "Creating file " << logfile << std::endl; std::ofstream out (logfile.c_str ()); + float avg_server_time = 0, avg_client_time = 0; + size_t count = 0; for (TimingList::iterator it = history_.begin (); it != history_.end (); - ++it) + ++it, ++count) { + if(count > 0) + { + avg_server_time += it->server_time.msec(); + avg_client_time += it->client_time.msec(); + } out << it->server_time.msec () << " " << it->client_time.msec () << std::endl; } - out.close (); + if(count > 1) + out << avg_server_time/(count-1) << " " + << avg_client_time/(count-1) << std::endl; + out.close (); } } diff --git a/CIAO/DAnCE/tests/CIAO/FTComponents/FTComponents.mpc b/CIAO/DAnCE/tests/CIAO/FTComponents/FTComponents.mpc index dbb73e872cb..4c9b9d75684 100644 --- a/CIAO/DAnCE/tests/CIAO/FTComponents/FTComponents.mpc +++ b/CIAO/DAnCE/tests/CIAO/FTComponents/FTComponents.mpc @@ -65,8 +65,8 @@ project(FTClient_cidl_gen) : ciaocidldefaults, ciaoidldefaults { -Wb,export_include=FTClient_exec_export.h \ -SS - idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT - cidlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT + idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT + cidlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT CIDL_Files { FTClient.cidl @@ -171,7 +171,7 @@ project(FTTask_idl_gen) : ciaoidldefaults, anytypecode { -Wb,stub_export_include=FTTask_stub_export.h \ -Wb,skel_export_macro=FTTASK_SVNT_Export \ -Wb,skel_export_include=FTTask_svnt_export.h - idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT + idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT IDL_Files { FTTask.idl @@ -187,8 +187,8 @@ project(FTTask_cidl_gen) : ciaocidldefaults, ciaoidldefaults { -Wb,export_include=FTTask_exec_export.h \ -SS - idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT - cidlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT + idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT + cidlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT CIDL_Files { FTTask.cidl diff --git a/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask.idl b/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask.idl index 3e6b72e6508..5067fbdaa8e 100644 --- a/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask.idl +++ b/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask.idl @@ -6,7 +6,7 @@ module DeCoRAM { - component FTTask supports Worker, ReplicatedApplication + component FTTask supports Worker, ReplicatedApplication { attribute Object COMPONENT_REFERENCE; attribute short role; diff --git a/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask_exec.cpp b/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask_exec.cpp index 34dabd1dc1b..9d83e7485e9 100644 --- a/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask_exec.cpp +++ b/CIAO/DAnCE/tests/CIAO/FTComponents/FTTask_exec.cpp @@ -84,19 +84,23 @@ namespace CIDL_FTTask_Impl { } + //task_.signal (); + + this->cpu_.run (static_cast <size_t> (execution_time)); + ++state_; if (state_ == suicidal_count_) { - CIAO_DEBUG((LM_EMERGENCY, - "\n********* Sleeping 4 seconds before exiting.\n")); - sleep(4); + CIAO_DEBUG((LM_EMERGENCY, "\n********* CRASHING *************\n")); + //sleep(4); exit(1); } - //task_.signal (); - - this->cpu_.run (static_cast <size_t> (execution_time)); - - //agent_->state_changed (object_id_.c_str ()); + + if(primary_) + { + //agent_->state_changed (object_id_.c_str ()); + agent_->precommit_state (object_id_.c_str ()); + } timer_.stop (); @@ -392,12 +396,15 @@ namespace CIDL_FTTask_Impl // publish application in NameService for the client if (primary_) - { - Name_Helper_T <Worker> tnh (orb_.in ()); - - tnh.bind ("FLARE_TESTAPPLICATION/" + object_id_, - ref.in ()); - } + { + Name_Helper_T <Worker> tnh (orb_.in ()); + tnh.bind ("FLARE_TESTAPPLICATION/" + object_id_, ref.in ()); + } + else + { + Name_Helper_T <Worker> tnh (orb_.in ()); + tnh.bind ("FLARE_TESTAPPLICATION_BACKUP/" + object_id_, ref.in ()); + } // and write it to a file std::string iorfilename; @@ -451,7 +458,6 @@ namespace CIDL_FTTask_Impl return std::string (hn_str); } - std::string FTTask_exec_i::get_process_id () { @@ -462,7 +468,6 @@ namespace CIDL_FTTask_Impl return ss.str (); } - extern "C" FTTASK_EXEC_Export ::Components::EnterpriseComponent_ptr create_DeCoRAM_FTTask_Impl (void) { |