Skip to content

Commit

Permalink
chore: Remove personal comments in file header
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Nov 27, 2023
1 parent 79cd226 commit a852dff
Show file tree
Hide file tree
Showing 147 changed files with 100 additions and 1,152 deletions.
8 changes: 0 additions & 8 deletions src/common/fs_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* fs_manager's implement: used to track the disk position for all the allocated replicas
*
* Revision history:
* 2017-08-08: [email protected], first draft
*/

#include "fs_manager.h"

#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions src/common/fs_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ struct dir_node
void update_disk_stat();
};

// Track the data directories and replicas.
class fs_manager
{
public:
Expand Down
1 change: 1 addition & 0 deletions src/common/gpid.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#pragma once

#include <cstdint>
Expand Down
1 change: 1 addition & 0 deletions src/common/json_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#pragma once

#include <cctype>
Expand Down
8 changes: 0 additions & 8 deletions src/common/replication_other_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* What is this file about?
*
* Revision history:
* xxxx-xx-xx, author, first version
* xxxx-xx-xx, author, fix bug about xxx
*/
#ifndef replication_OTHER_TYPES_H
#define replication_OTHER_TYPES_H

Expand Down
58 changes: 23 additions & 35 deletions src/failure_detector/failure_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* interface for a perfect failure detector
*
* Revision history:
* Mar., 2015, @imzhenyu (Zhenyu Guo), first version
* Dec., 2015, @shengofsun (Weijie Sun), make zlock preoteced,
* give the subClasses flexibility
* xxxx-xx-xx, author, fix bug about xxx
*/

/*
* Notes on the failure detector:
*
* 1. Due to the fact that we can only check the liveness inside check-all-records call,
* which happens every "check_interval_seconds" seconds, worker may disconnect from master
* in the period earlier than the lease_seconds to ensure the perfect FD.
* In the worst case, workers may disconnect themselves
* after "lease"-"check_interval_seconds" seconds;
*
* Similarily, master may claim a worker dead more slowly even the workers are dead
* for longer than grace_seconds. In the worst case, it will be
* "grace"+"check_interval_seconds" seconds.
*
* 2. In practice, your should set check_interval_seconds a small value for a fine-grained FD.
* For client, you may set it as 2 second as it usually connect to a small number of masters.
* For master, you may set it as 5 or 10 seconds.
*
* 3. We should always use dedicated thread pools for THREAD_POOL_FD,
* and set thread priority to being highest so as to minimize the performance
* interference with other workloads.
*
* 4. The lease_periods must be less than the grace_periods, as required by prefect FD.
*
*/
#pragma once

#include <stdint.h>
Expand Down Expand Up @@ -106,6 +71,29 @@ class failure_detector_callback
virtual void on_worker_connected(::dsn::rpc_address node) = 0;
};

// The interface for a perfect failure detector.
//
// Notes on the failure detector:
//
// 1. Due to the fact that we can only check the liveness inside check-all-records call,
// which happens every "check_interval_seconds" seconds, worker may disconnect from master
// in the period earlier than the lease_seconds to ensure the perfect FD.
// In the worst case, workers may disconnect themselves
// after "lease"-"check_interval_seconds" seconds;
//
// Similarily, master may claim a worker dead more slowly even the workers are dead
// for longer than grace_seconds. In the worst case, it will be
// "grace"+"check_interval_seconds" seconds.
//
// 2. In practice, your should set check_interval_seconds a small value for a fine-grained FD.
// For client, you may set it as 2 second as it usually connect to a small number of masters.
// For master, you may set it as 5 or 10 seconds.
//
// 3. We should always use dedicated thread pools for THREAD_POOL_FD,
// and set thread priority to being highest so as to minimize the performance
// interference with other workloads.
//
// 4. The lease_periods must be less than the grace_periods, as required by prefect FD.
class failure_detector : public failure_detector_service,
public failure_detector_client,
public failure_detector_callback
Expand Down
9 changes: 0 additions & 9 deletions src/failure_detector/failure_detector_multimaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* What is this file about?
*
* Revision history:
* xxxx-xx-xx, author, first version
* xxxx-xx-xx, author, fix bug about xxx
*/

#include <stdint.h>
#include <utility>

Expand Down
9 changes: 0 additions & 9 deletions src/failure_detector/fd.client.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* What is this file about?
*
* Revision history:
* xxxx-xx-xx, author, first version
* xxxx-xx-xx, author, fix bug about xxx
*/

#pragma once
#include "fd.code.definition.h"
#include <iostream>
Expand Down
9 changes: 0 additions & 9 deletions src/failure_detector/fd.server.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* What is this file about?
*
* Revision history:
* xxxx-xx-xx, author, first version
* xxxx-xx-xx, author, fix bug about xxx
*/

#pragma once
#include "fd.code.definition.h"
#include <iostream>
Expand Down
9 changes: 0 additions & 9 deletions src/meta/distributed_lock_service_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* a simple version of distributed lock service for development
*
* Revision history:
* 2015-11-04, @imzhenyu ([email protected]), first version
* xxxx-xx-xx, author, fix bug about xxx
*/

#include <chrono>

#include "common/replication.codes.h"
Expand Down
13 changes: 3 additions & 10 deletions src/meta/distributed_lock_service_simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* a simple version of distributed lock service for development
*
* Revision history:
* 2015-11-04, @imzhenyu ([email protected]), first version
* xxxx-xx-xx, author, fix bug about xxx
*/

#pragma once

#include <stdint.h>
Expand All @@ -53,7 +44,9 @@

namespace dsn {
namespace dist {
// Only for test purpose.

// A simple version of distributed lock service.
// NOTE: Only for test purpose.
class distributed_lock_service_simple : public distributed_lock_service
{
public:
Expand Down
9 changes: 1 addition & 8 deletions src/meta/greedy_load_balancer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* A greedy load balancer based on Dijkstra & Ford-Fulkerson
*
* Revision history:
* 2016-02-03, Weijie Sun, first version
*/

#pragma once

#include <memory>
Expand All @@ -51,6 +43,7 @@ namespace replication {
class load_balance_policy;
class meta_service;

// A greedy load balancer based on Dijkstra & Ford-Fulkerson.
class greedy_load_balancer : public server_load_balancer
{
public:
Expand Down
8 changes: 0 additions & 8 deletions src/meta/meta_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* the meta server's date structure, impl file
*
* Revision history:
* 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version
* xxxx-xx-xx, author, fix bug about xxx
*/
#include <boost/lexical_cast.hpp>
#include <cstdint>

Expand Down
8 changes: 0 additions & 8 deletions src/meta/meta_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* the meta server's date structure
*
* Revision history:
* 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version
* xxxx-xx-xx, author, fix bug about xxx
*/
#pragma once

#include <stdint.h>
Expand Down
8 changes: 0 additions & 8 deletions src/meta/meta_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* the meta server's options, impl file
*
* Revision history:
* 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version
* xxxx-xx-xx, author, fix bug about xxx
*/
#include "meta_options.h"

#include <stddef.h>
Expand Down
9 changes: 1 addition & 8 deletions src/meta/meta_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* the meta server's options
*
* Revision history:
* 2016-04-25, Weijie Sun(sunweijie at xiaomi.com), first version
* xxxx-xx-xx, author, fix bug about xxx
*/
#pragma once

#include <string>
Expand All @@ -49,6 +41,7 @@ class fd_suboptions
std::vector<std::string> distributed_lock_service_args;
};

// The meta server's options.
class meta_options
{
public:
Expand Down
10 changes: 1 addition & 9 deletions src/meta/meta_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* meta server service for EON (rDSN layer 2)
*
* Revision history:
* 2015-03-09, @imzhenyu (Zhenyu Guo), first version
* xxxx-xx-xx, author, fix bug about xxx
*/

#pragma once

#include <fmt/core.h>
Expand Down Expand Up @@ -132,6 +123,7 @@ enum class meta_leader_state : int
kNotLeaderAndCannotForwardRpc, // meta isn't leader, and rpc-msg can't forward to others
};

// Meta server service for EON (rDSN layer 2).
class meta_service : public serverlet<meta_service>
{
public:
Expand Down
1 change: 1 addition & 0 deletions src/meta/meta_service_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#pragma once

#include <memory>
Expand Down
19 changes: 2 additions & 17 deletions src/meta/meta_state_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* interface of the reliable meta state service
* it is usually for storing meta state of dist systems, such as membership
*
* Revision history:
* 2015-10-28, Weijie Sun, first version
* 2015-11-05, @imzhenyu (Zhenyu Guo), adjust the interface, so that
* (1) return task_ptr/tracker for callers to cancel or wait;
* (2) add factory for provider registration;
* (3) add cb_code parameter, then users can specify where the callback
* should be executed
* 2015-11-06, @imzhenyu (Zhenyu Guo), add watch/unwatch API
* 2015-12-28, @shengofsun (Weijie SUn), add transaction api
* xxxx-xx-xx, author, fix bug about xxx
*/

#pragma once

#include <functional>
Expand Down Expand Up @@ -68,6 +51,8 @@ typedef std::function<void(error_code ec, const std::vector<std::string> &ret_st
typedef future_task<error_code, std::vector<std::string>> err_stringv_future;
typedef dsn::ref_ptr<err_stringv_future> err_stringv_future_ptr;

// The interface of the reliable meta state service.
// It is usually for storing meta state of dist systems, such as membership.
class meta_state_service
{
public:
Expand Down
12 changes: 2 additions & 10 deletions src/meta/meta_state_service_simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
* THE SOFTWARE.
*/

/*
* Description:
* a simple version of meta state service for development
*
* Revision history:
* 2015-11-03, @imzhenyu ([email protected]), setup the sketch
* 2015-11-11, Tianyi WANG, first version done
*/

#include <stddef.h>
#include <stdint.h>
#include <functional>
Expand Down Expand Up @@ -66,7 +57,8 @@ DEFINE_TASK_CODE_AIO(LPC_META_STATE_SERVICE_SIMPLE_INTERNAL,
TASK_PRIORITY_HIGH,
THREAD_POOL_DEFAULT);

// Only for test purpose.
// A simple version of meta state service.
// NOTE: Only for test purpose.
class meta_state_service_simple : public meta_state_service
{
public:
Expand Down
Loading

0 comments on commit a852dff

Please sign in to comment.