Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Merge branch import_braft #300

Merged

Conversation

dingxiaoshuai123
Copy link
Collaborator

@dingxiaoshuai123 dingxiaoshuai123 commented Apr 30, 2024

将 import-braft 分支 merge 到了主分支

panlei-coder and others added 30 commits March 6, 2024 16:57
* feat: import braft
---------

Co-authored-by: century <919745273@qq.com>
Co-authored-by: alexstocks <alexstocks@foxmail.com>
Co-authored-by: dingxiaoshuai123 <2486016589@qq.com>
…oundation#136)

* feat: Implementing Redis-Raft commands to build a cluster

Co-authored-by: panlei-coder <panleiCSDN@163.com>
Co-authored-by: century <919745273@qq.com>
Co-authored-by: panlei-coder <62509266+panlei-coder@users.noreply.github.com>
Co-authored-by: alexstocks <alexstocks@foxmail.com>
Co-authored-by: dingxiaoshuai123 <2486016589@qq.com>
Co-authored-by: longfar <ningchangyuan@nuaa.edu.cn>
OpenAtomFoundation#193)

* fix: return error status in GetListPeers and add check for return-type in cmake

* ci: run actions when pull request to import-braft

* Revert "ci: run actions when pull request to import-braft"

This reverts commit 727c84d.
* fix: disappearing roles bug

* fix: can not find libgflags.a for build in debug version

* fix: add download prefix of braft

* fix: rm -f xxx
PSTORE checkpoint interface
…enAtomFoundation#242)

* fix: fix some code style and formatting issues with checkpoint pr

* fix: resolve code conflicts

* fix: fix format

* fix: remove unnecessary forward references
* feat: move log_index codes

* feat: init log index and update when write successfully

* refactor: use deque instead of list to save logidx-seqno
* ci: add a actions for import-braft branch temporarily
* fix: Modify the string matching bug

---------

Co-authored-by: longfar <ningchangyuan@nuaa.edu.cn>
* fix: find openssl

* refactor: remove unused codes
…snapshot when follower installs snapshot (OpenAtomFoundation#279)

* feat: overload the PosixFileSystemAdaptor interface to generate real snapshot when follower installs snapshot

---------

Co-authored-by: dingxiaoshuai123 <2486016589@qq.com>
Co-authored-by: Xin.Zh <dragoncharlie@foxmail.com>
Co-authored-by: 丁小帅 <56024577+dingxiaoshuai123@users.noreply.github.com>
* Revert to using the version with independent atomic variables.
* Revert to using the version with independent atomic variables.
@github-actions github-actions bot added ✏️ Feature New feature or request 📒 Documentation Improvements or additions to documentation labels Apr 30, 2024
pikiwidb.conf Outdated Show resolved Hide resolved
src/storage/src/batch.h Outdated Show resolved Hide resolved
src/cmd_raft.cc Outdated Show resolved Hide resolved
src/storage/src/storage.cc Show resolved Hide resolved
src/storage/src/storage.cc Outdated Show resolved Hide resolved
src/db.h Outdated Show resolved Hide resolved
src/db.cc Outdated
Comment on lines 71 to 75
for (int i = 0; i < rocksdb_inst_num_; ++i) {
// In a new thread, create a checkpoint for the specified rocksdb i
// In DB::DoBgSave, a read lock is always held to protect the Storage
// corresponding to this rocksdb i.
auto res = std::async(std::launch::async, &DB::DoCheckpoint, this, path, i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得这里开启rocksdb_inst_num_个异步任务可以放到Storage层去做,现有逻辑是DB层开启多个异步任务,每个异步任务通过storage层执行某一个rocksdb的检查点创建,感觉DB与rocksdb耦合了(DB:1--storage:1--rocksdb:1),我觉得放到storage层更好,符合原有抽象(DB:1--storage:1--rocksdb:n)(当然也可能理解有误= =)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯嗯 同意你的想法 确实现在的代码是DB感知到了rocksdb的存在,有点不太符合DB:1--storage:1--rocksdb:1这样的抽象。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我改一下

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/db.cc Outdated Show resolved Hide resolved
src/db.cc Show resolved Hide resolved
AlexStocks
AlexStocks previously approved these changes May 6, 2024
src/cmd_kv.cc Outdated Show resolved Hide resolved
src/CMakeLists.txt Outdated Show resolved Hide resolved
@AlexStocks AlexStocks merged commit e9e535b into OpenAtomFoundation:unstable May 6, 2024
5 checks passed
@dingxiaoshuai123 dingxiaoshuai123 deleted the merge_import_braft branch May 6, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📒 Documentation Improvements or additions to documentation ✏️ Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants