mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 11:00:35 +00:00
Make the impl::is_abortable() return 'yes' and check the impl::_as in the files listing loop. It's not real abort, since files listing loop is expected to be fast and most of the time will be spent in s3::client code reading data from disk and sending them to S3, but client doesn't support aborting its requests. That's some work yet to be done. Also add injection for future testing. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
44 lines
967 B
C++
44 lines
967 B
C++
/*
|
|
* Copyright (C) 2024-present ScyllaDB
|
|
*
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "tasks/task_manager.hh"
|
|
|
|
namespace s3 { class client; }
|
|
|
|
namespace db {
|
|
class snapshot_ctl;
|
|
|
|
namespace snapshot {
|
|
|
|
class backup_task_impl : public tasks::task_manager::task::impl {
|
|
snapshot_ctl& _snap_ctl;
|
|
shared_ptr<s3::client> _client;
|
|
sstring _bucket;
|
|
sstring _ks;
|
|
sstring _snapshot_name;
|
|
std::exception_ptr _ex;
|
|
|
|
future<> run(sstring data_dir);
|
|
|
|
protected:
|
|
virtual future<> run() override;
|
|
|
|
public:
|
|
backup_task_impl(tasks::task_manager::module_ptr module, snapshot_ctl& ctl, shared_ptr<s3::client> cln, sstring bucket, sstring ks, sstring snapshot_name) noexcept;
|
|
|
|
virtual std::string type() const override;
|
|
virtual tasks::is_internal is_internal() const noexcept override;
|
|
virtual tasks::is_abortable is_abortable() const noexcept override;
|
|
};
|
|
|
|
} // snapshot namespace
|
|
} // db namespace
|