Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
gukj-spel committed Sep 21, 2024
1 parent 0b6047a commit 6ef8989
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/base_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include "common.h"
#include "config.h"
#include "log.h"
#include "kiwi.h"
#include "log.h"
#include "praft/praft.h"

namespace kiwi {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd_thread_pool_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "cmd_thread_pool_worker.h"
#include "client.h"
#include "env.h"
#include "log.h"
#include "kiwi.h"
#include "log.h"

namespace kiwi {

Expand Down
6 changes: 3 additions & 3 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
#pragma once

#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <functional>
#include <map>
#include <memory>
#include <shared_mutex>
#include <cstring>
#include <cstdint>
#include <cstddef>
#include <unordered_map>
#include <utility>
#include <vector>
Expand Down
14 changes: 7 additions & 7 deletions src/pstd/memory_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class OutputMemoryFile {
* Initialize some private value.
*/
OutputMemoryFile();

/*------------------------
* ~OutputMemoryFile()
* Close file and free the memory.
Expand All @@ -131,7 +131,7 @@ class OutputMemoryFile {
* Close file and end the mapping relation.
*/
void Close();

/*------------------------
* Sync()
* Synchronize memory content to disk.
Expand All @@ -140,7 +140,7 @@ class OutputMemoryFile {

/*------------------------
* Truncate(std::size_t size)
* Adjust the file block size to the specified bytes
* Adjust the file block size to the specified bytes
* and rebuild the mapping relationship.
*/
void Truncate(std::size_t size);
Expand All @@ -149,14 +149,14 @@ class OutputMemoryFile {
* TruncateTailZero()
* Equal to Truncate(0), if process terminated abnormally,
* erase the trash data.
*/
*/
void TruncateTailZero();

/*------------------------
* Write(const void* data, std::size_t len)
* Write the content of the specified length into the buffer
* Write the content of the specified length into the buffer
* and adjust the offset.
*/
*/
void Write(const void* data, std::size_t len);

// Write data to file buffer and adjust the offset.
Expand Down Expand Up @@ -197,7 +197,7 @@ class OutputMemoryFile {

// fd
int file_ = -1;

// The file content buffer
char* pMemory_ = nullptr;

Expand Down
5 changes: 2 additions & 3 deletions src/replication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

#include "client.h"
#include "config.h"
#include "log.h"
#include "kiwi.h"
#include "log.h"
#include "pstd/pstd_string.h"
#include "replication.h"

Expand Down Expand Up @@ -189,8 +189,7 @@ void PReplication::Cron() {

INFO("Try connect to master IP:{} port:{}", masterInfo_.addr.GetIP(), masterInfo_.addr.GetPort());

auto on_new_conn = [](uint64_t connID, std::shared_ptr<kiwi::PClient>& client,
const net::SocketAddr& addr) {
auto on_new_conn = [](uint64_t connID, std::shared_ptr<kiwi::PClient>& client, const net::SocketAddr& addr) {
INFO("Connect to master IP:{} port:{}", addr.GetIP(), addr.GetPort());
if (g_kiwi) {
g_kiwi->OnNewConnection(connID, client, addr);
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include "binlog.pb.h"
#include "config.h"
#include "pstd/log.h"
#include "pstd/kiwi_slot.h"
#include "pstd/log.h"
#include "pstd/pstd_string.h"
#include "rocksdb/utilities/checkpoint.h"
#include "scope_snapshot.h"
Expand Down

0 comments on commit 6ef8989

Please sign in to comment.