This is an automated email from the ASF dual-hosted git repository.

saipranav pushed a commit to branch ResViewCrow
in repository https://gitbox.apache.org/repos/asf/incubator-resilientdb.git


The following commit(s) were added to refs/heads/ResViewCrow by this push:
     new 52a6e2bc "Removed vestigial variables, turned off faulty switch for PR"
52a6e2bc is described below

commit 52a6e2bc0d992cd1f22a71e22ca9c85d4535a334
Author: Saipranav Kotamreddy <[email protected]>
AuthorDate: Sat Mar 30 10:45:07 2024 -0700

    "Removed vestigial variables, turned off faulty switch for PR"
---
 platform/statistic/stats.cpp              | 4 +---
 platform/statistic/stats.h                | 7 -------
 service/tools/config/server/server.config | 2 +-
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/platform/statistic/stats.cpp b/platform/statistic/stats.cpp
index 0aaacfae..a06d11b3 100644
--- a/platform/statistic/stats.cpp
+++ b/platform/statistic/stats.cpp
@@ -70,7 +70,6 @@ Stats::Stats(int sleep_time) {
   transaction_summary_.port=-1;
 
   //Setup websocket here
-  //send_summary_.store(false);
   make_faulty_.store(false);
   
transaction_summary_.request_pre_prepare_state_time=std::chrono::system_clock::time_point::min();
   
transaction_summary_.prepare_state_time=std::chrono::system_clock::time_point::min();
@@ -87,7 +86,7 @@ Stats::~Stats() {
   if (global_thread_.joinable()) {
     global_thread_.join();
   }
-  if(enable_resview && summary_thread_.joinable()){
+  if(enable_resview && crow_thread_.joinable()){
     crow_thread_.join();
   }
 }
@@ -214,7 +213,6 @@ void Stats::SendSummary(){
     return;
   }
   transaction_summary_.execution_time=std::chrono::system_clock::now();
-  //transaction_summary_.txn_number=transaction_summary_.txn_number+1;
 
   //Convert Transaction Summary to JSON
   summary_json_["replica_id"]=transaction_summary_.replica_id;
diff --git a/platform/statistic/stats.h b/platform/statistic/stats.h
index 54f201a8..621aaf84 100644
--- a/platform/statistic/stats.h
+++ b/platform/statistic/stats.h
@@ -40,20 +40,16 @@ namespace resdb {
 struct VisualData{
     //Set when initializing
     int replica_id;
-    //Initially Set when intiializing, update after view change
     int primary_id;
     std::string ip;
     int port;
 
     //Set when new txn is received
-    //Need to figure out how to parse message at this stage for this data
     int txn_number;
     std::vector<std::string> txn_command;
     std::vector<std::string> txn_key;
     std::vector<std::string> txn_value;
 
-    //Reset after sending summary
-
     //Request state if primary_id==replica_id, pre_prepare state otherwise
     std::chrono::system_clock::time_point request_pre_prepare_state_time;
     std::chrono::system_clock::time_point prepare_state_time;
@@ -140,13 +136,10 @@ class Stats{
   std::atomic<uint64_t> total_request_, total_geo_request_, geo_request_;
   int monitor_sleep_time_ = 5;  // default 5s.
 
-  std::thread summary_thread_;
-  std::thread faulty_thread_;
   std::thread crow_thread_;
   bool enable_resview;
   bool enable_faulty_switch_;
   VisualData transaction_summary_;
-  std::atomic<bool> send_summary_;
   std::atomic<bool> make_faulty_;
   std::atomic<uint64_t> prev_num_prepare_;
   std::atomic<uint64_t> prev_num_commit_;
diff --git a/service/tools/config/server/server.config 
b/service/tools/config/server/server.config
index 405d7fc9..1dc5b0de 100644
--- a/service/tools/config/server/server.config
+++ b/service/tools/config/server/server.config
@@ -35,7 +35,7 @@
   require_txn_validation:true,
   enable_viewchange:true,
   enable_resview:true,
-  enable_faulty_switch:true
+  enable_faulty_switch:false
 }
 
 

Reply via email to