Skip to content

Commit

Permalink
change to kiwi
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahashen committed Sep 21, 2024
1 parent 52f7170 commit a36d8b9
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/cache_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

namespace pikiwidb {
namespace kiwi {
/*
* cache mode
*/
Expand Down Expand Up @@ -39,4 +39,4 @@ const int64_t CACHE_LOAD_NUM_ONE_TIME = 256;

// TTL option
const int PCache_TTL_NONE = -1;
} // namespace pikiwidb
} // namespace kiwi
2 changes: 1 addition & 1 deletion src/cmd_kv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ IncrbyFloatCmd::IncrbyFloatCmd(const std::string& name, int16_t arity)

bool IncrbyFloatCmd::DoInitial(PClient* client) {
long double by_ = 0.00f;
if (pikiwidb::StrToLongDouble(client->argv_[2].data(), client->argv_[2].size(), &by_)) {
if (kiwi::StrToLongDouble(client->argv_[2].data(), client->argv_[2].size(), &by_)) {
client->SetRes(CmdRes::kInvalidFloat);
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/pcache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "pstd/log.h"
#include "store.h"

namespace pikiwidb {
namespace kiwi {

#define EXTEND_CACHE_SIZE(N) (N * 12 / 10)
using rocksdb::Status;
Expand Down Expand Up @@ -1465,4 +1465,4 @@ void PCache::ClearHitRatio(void) {
std::unique_lock l(rwlock_);
cache::RedisCache::ResetHitAndMissNum();
}
} // namespace pikiwidb
} // namespace kiwi
4 changes: 2 additions & 2 deletions src/pcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "pstd/pstd_mutex.h"
#include "pstd/pstd_status.h"

namespace pikiwidb {
namespace kiwi {

class PCacheLoadThread;
class ZRangebyscoreCmd;
Expand Down Expand Up @@ -215,4 +215,4 @@ class PCache : public pstd::noncopyable, public std::enable_shared_from_this<PCa
std::vector<cache::RedisCache*> caches_;
std::vector<std::shared_ptr<pstd::Mutex>> cache_mutexs_;
};
} // namespace pikiwidb
} // namespace kiwi
4 changes: 2 additions & 2 deletions src/pcache_load_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "pstd/scope_record_lock.h"
#include "store.h"

namespace pikiwidb {
namespace kiwi {

PCacheLoadThread::PCacheLoadThread(int zset_cache_start_direction, int zset_cache_field_num_per_key)
: should_exit_(false),
Expand Down Expand Up @@ -199,4 +199,4 @@ void* PCacheLoadThread::ThreadMain() {

return nullptr;
}
} // namespace pikiwidb
} // namespace kiwi
4 changes: 2 additions & 2 deletions src/pcache_load_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "pcache.h"
#include "thread.h"

namespace pikiwidb {
namespace kiwi {

class PCacheLoadThread : public Thread {
public:
Expand Down Expand Up @@ -52,4 +52,4 @@ class PCacheLoadThread : public Thread {
int zset_cache_start_direction_;
int zset_cache_field_num_per_key_;
};
} // namespace pikiwidb
} // namespace kiwi
4 changes: 2 additions & 2 deletions src/thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "thread.h"

namespace pikiwidb {
namespace kiwi {

Thread::Thread() : should_stop_(false) {}

Expand Down Expand Up @@ -47,4 +47,4 @@ int Thread::StopThread() {

int Thread::JoinThread() { return pthread_join(thread_id_, nullptr); }

} // namespace pikiwidb
} // namespace kiwi
4 changes: 2 additions & 2 deletions src/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "pstd/noncopyable.h"
#include "pstd/pstd_mutex.h"

namespace pikiwidb {
namespace kiwi {

class Thread : public pstd::noncopyable {
public:
Expand Down Expand Up @@ -53,4 +53,4 @@ class Thread : public pstd::noncopyable {
pthread_t thread_id_{};
std::string thread_name_;
};
} // namespace pikiwidb
} // namespace kiwi

0 comments on commit a36d8b9

Please sign in to comment.