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: call backup completion notification of backup and backup_detail… #261

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/tateyama/datastore/service/core.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2024 Project Tsurugi.
* Copyright 2018-2025 Project Tsurugi.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,6 @@
#include "altimeter_logger.h"
#endif


namespace tateyama::datastore::service {

using tateyama::api::server::request;
Expand Down Expand Up @@ -105,13 +104,21 @@ bool tateyama::datastore::service::core::operator()(const std::shared_ptr<reques
}
case ns::Request::kBackupEnd: {
tateyama::proto::datastore::response::BackupEnd rp{};
resource_->end_backup();
if (backup_ || backup_detail_) {
if (backup_) {
backup_->backup().notify_end_backup();
}
if (backup_detail_) {
backup_detail_->notify_end_backup();
}
rp.mutable_success();
res->session_id(req->session_id());
auto body = rp.SerializeAsString();
res->body(body);
rp.clear_success();
backup_ = nullptr;
backup_detail_ = nullptr;
} else {
rp.mutable_expired();
}
Expand Down