Skip to content

Commit

Permalink
style: Apply Clang format to modified files ,and restore patch files,…
Browse files Browse the repository at this point in the history
… and rebase all conficts.
  • Loading branch information
koko2pp committed Oct 13, 2023
1 parent bd648f4 commit 12fbff3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 34 deletions.
12 changes: 4 additions & 8 deletions src/chunkserver/chunkserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ int ChunkServer::Run(int argc, char** argv) {

RegisterCurveSegmentLogStorageOrDie();

// ==========================Load Configuration
// Items===============================//
// ============Load Configuration Items============ //
LOG(INFO) << "Loading Configuration.";
common::Configuration conf;
conf.SetConfigPath(FLAGS_conf.c_str());
Expand All @@ -107,8 +106,7 @@ int ChunkServer::Run(int argc, char** argv) {
conf.ExposeMetric("chunkserver_config");
curve::common::ExposeCurveVersion();

// ============================nitialize each
// module==========================//
// ============Initialize each module============ //
LOG(INFO) << "Initializing ChunkServer modules";

// Prioritize initializing the metric collection module
Expand Down Expand Up @@ -418,8 +416,7 @@ int ChunkServer::Run(int argc, char** argv) {
}
}

// =======================Start each
// module==================================//
// ==========Start each module==========//
LOG(INFO) << "ChunkServer starts.";
/**
* Placing module startup after RPC service startup is mainly to address
Expand All @@ -436,8 +433,7 @@ int ChunkServer::Run(int argc, char** argv) {
LOG_IF(FATAL, !chunkfilePool->StartCleaning())
<< "Failed to start file pool clean worker.";

// =======================Wait for the process to
// exit==================================//
// ==========Wait for the process to exit========== //
while (!brpc::IsAskedToQuit()) {
bthread_usleep(1000000L);
}
Expand Down
10 changes: 5 additions & 5 deletions src/chunkserver/clone_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ int CloneCore::HandleReadRequest(std::shared_ptr<ReadChunkRequest> readRequest,
CSErrorCode errorCode = dataStore->GetChunkInfo(id, &chunkInfo);

/*
*Chunk exists: Check and analyze Bitmap to determine if it can be read
*locally Chunk does not exist: if it contains clone information, it will be
*read from clonesource, otherwise an error will be returned Because the
*upper level ReadChunkRequest::OnApply has already processed NoExist And
*the situation where cloneinfo does not exist
* Chunk exists: Check and analyze Bitmap to determine if it can be read
* locally Chunk does not exist: if it contains clone information, it will be
* read from clonesource, otherwise an error will be returned Because the
* upper level ReadChunkRequest::OnApply has already processed NoExist And
* the situation where cloneinfo does not exist
*/
switch (errorCode) {
case CSErrorCode::Success:
Expand Down
12 changes: 6 additions & 6 deletions src/chunkserver/conf_epoch_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ class ConfEpochFile {

/**
* Serialize configuration version information and save it to a snapshot
*file. The format is as follows: The 'head' indicates the length and is in
*binary format. The rest is in text format for easy viewing when necessary.
*'sync' ensures data persistence. | head |
*Configuration version information | | 8 bytes size_t | uint32_t |
*Variable length text | | length | crc32 | logic pool id
*| copyset id | epoch| The persistence above is separated by ':'
* file. The format is as follows: The 'head' indicates the length and is in
* binary format. The rest is in text format for easy viewing when necessary.
* 'sync' ensures data persistence. | head |
* Configuration version information | | 8 bytes size_t | uint32_t |
* Variable length text | | length | crc32 | logic pool id
* | copyset id | epoch| The persistence above is separated by ':'
* @param path: File path
* @param logicPoolID: Logical Pool ID
* @param copysetID: Copy group ID
Expand Down
4 changes: 2 additions & 2 deletions src/common/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class Bitmap {
explicit Bitmap(uint32_t bits);
/**
* Constructor when initializing from an existing snapshot file
*The constructor will create a new bitmap internally, and then use the
*bitmap memcpy in the parameters
* The constructor will create a new bitmap internally, and then use the
* bitmap memcpy in the parameters
* @param bits: Bitmap bits
* @param bitmap: An externally provided bitmap for initialization
*/
Expand Down
24 changes: 12 additions & 12 deletions src/tools/chunkserver_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,22 @@ class ChunkServerClient {
virtual bool CheckChunkServerOnline();

/**
* @brief calls the GetCopysetStatus interface of chunkserver
* @param request Query the request for the copyset
* @param response The response returned contains detailed information about
* the replication group, which is valid when the return value is 0
* @return returns 0 for success, -1 for failure
*/
* @brief calls the GetCopysetStatus interface of chunkserver
* @param request Query the request for the copyset
* @param response The response returned contains detailed information
* about the replication group, which is valid when the return value is 0
* @return returns 0 for success, -1 for failure
*/
virtual int GetCopysetStatus(const CopysetStatusRequest& request,
CopysetStatusResponse* response);

/**
* @brief Get the hash value of chunks from chunkserver
* @param chunk The chunk to query
* @param[out] The hash value chunkHash chunk, valid when the return value
* is 0
* @return returns 0 for success, -1 for failure
*/
* @brief Get the hash value of chunks from chunkserver
* @param chunk The chunk to query
* @param[out] The hash value chunkHash chunk, valid when the return value
* is 0
* @return returns 0 for success, -1 for failure
*/
virtual int GetChunkHash(const Chunk& chunk, std::string* chunkHash);

private:
Expand Down
2 changes: 1 addition & 1 deletion test/integration/cluster_common/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CurveCluster {
/**
* StartSingleMDS starts an mds
* If need chunkservers with different IPs, please set the ipPort to
192.168.200.1:XXXX
* 192.168.200.1:XXXX
*
* @param[in] id mdsId
* @param[in] ipPort specifies the ipPort of the mds
Expand Down

0 comments on commit 12fbff3

Please sign in to comment.