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:add lastsave cmd #2167

Merged
merged 19 commits into from
Dec 14, 2023
Merged

Conversation

hero-heng
Copy link
Contributor

@hero-heng hero-heng commented Nov 25, 2023

fix #1161

@github-actions github-actions bot added the ✏️ Feature New feature or request label Nov 25, 2023
@@ -308,6 +308,10 @@ void BgsaveCmd::Do(std::shared_ptr<Slot> slot) {
g_pika_server->DoSameThingSpecificDB(TaskType::kBgSave, bgsave_dbs_);
LogCommand();
res_.AppendContent("+Background saving started");
memset(&bgSaveTimeTv,0,sizeof(struct timeval));
Copy link
Collaborator

Choose a reason for hiding this comment

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

如果重启了怎么办?

src/storage/src/db_checkpoint.cc Outdated Show resolved Hide resolved
include/pika_server.h Outdated Show resolved Hide resolved
include/pika_server.h Outdated Show resolved Hide resolved
@wanghenshui
Copy link
Collaborator

补充单元测试

  • 空的实例执行lastsave
  • 执行过一次bgsave 再执行lastsave
  • 重启,执行lastsave

@wanghenshui
Copy link
Collaborator

lastsave_ 没有必要是static的,可以改掉

@wanghenshui
Copy link
Collaborator

多余文件删掉

@wanghenshui
Copy link
Collaborator

单测没过

@AlexStocks AlexStocks merged commit ba0d5ce into OpenAtomFoundation:unstable Dec 14, 2023
12 of 13 checks passed
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this pull request Jun 8, 2024
* feat:unstable branch

* feat:handle merge

* feat:add lastsave cmd

* feat:update lastsave cmd

* feat:update lastsave cmd

* feat:fixed lastsave cmd

* feat:fixed server_test.go

* feat:fixed server_test.go

* feat:fixed server_test.go

* feat:fixed server_test.go

* feat:update modifies

* feat:delete redundant files

* feat:fixed server_test

* feat:update code

* feat:update server_test

* feat:update ut
cheniujh pushed a commit to cheniujh/pika that referenced this pull request Sep 24, 2024
* feat:unstable branch

* feat:handle merge

* feat:add lastsave cmd

* feat:update lastsave cmd

* feat:update lastsave cmd

* feat:fixed lastsave cmd

* feat:fixed server_test.go

* feat:fixed server_test.go

* feat:fixed server_test.go

* feat:fixed server_test.go

* feat:update modifies

* feat:delete redundant files

* feat:fixed server_test

* feat:update code

* feat:update server_test

* feat:update ut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.5.3 ✏️ Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

redis API: support lastsave
3 participants