Remove now unneded dummy parameters.
GitOrigin-RevId: 4ffd517ab80431c0d52b2c0a1b01b0216383aefd
This commit is contained in:
parent
dc89a85449
commit
751dae9e64
@ -122,7 +122,7 @@ void StorageManager::run_gc(FileGcParameters parameters, Promise<FileStats> prom
|
|||||||
PromiseCreator::lambda(
|
PromiseCreator::lambda(
|
||||||
[actor_id = actor_id(this), parameters = std::move(parameters)](Result<FileStats> file_stats) {
|
[actor_id = actor_id(this), parameters = std::move(parameters)](Result<FileStats> file_stats) {
|
||||||
send_closure(actor_id, &StorageManager::on_all_files, std::move(parameters),
|
send_closure(actor_id, &StorageManager::on_all_files, std::move(parameters),
|
||||||
std::move(file_stats), false);
|
std::move(file_stats));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
//NB: get_storage_stats will cancel all gc queries, so promise needs to be added after the call
|
//NB: get_storage_stats will cancel all gc queries, so promise needs to be added after the call
|
||||||
@ -153,20 +153,20 @@ void StorageManager::create_stats_worker() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StorageManager::on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats, bool dummy) {
|
void StorageManager::on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats) {
|
||||||
int32 dialog_limit = gc_parameters.dialog_limit;
|
int32 dialog_limit = gc_parameters.dialog_limit;
|
||||||
if (is_closed_ && r_file_stats.is_ok()) {
|
if (is_closed_ && r_file_stats.is_ok()) {
|
||||||
r_file_stats = Status::Error(500, "Request aborted");
|
r_file_stats = Status::Error(500, "Request aborted");
|
||||||
}
|
}
|
||||||
if (r_file_stats.is_error()) {
|
if (r_file_stats.is_error()) {
|
||||||
return on_gc_finished(dialog_limit, std::move(r_file_stats), false);
|
return on_gc_finished(dialog_limit, std::move(r_file_stats));
|
||||||
}
|
}
|
||||||
|
|
||||||
create_gc_worker();
|
create_gc_worker();
|
||||||
|
|
||||||
send_closure(gc_worker_, &FileGcWorker::run_gc, std::move(gc_parameters), r_file_stats.move_as_ok().all_files,
|
send_closure(gc_worker_, &FileGcWorker::run_gc, std::move(gc_parameters), r_file_stats.move_as_ok().all_files,
|
||||||
PromiseCreator::lambda([actor_id = actor_id(this), dialog_limit](Result<FileStats> r_file_stats) {
|
PromiseCreator::lambda([actor_id = actor_id(this), dialog_limit](Result<FileStats> r_file_stats) {
|
||||||
send_closure(actor_id, &StorageManager::on_gc_finished, dialog_limit, std::move(r_file_stats), false);
|
send_closure(actor_id, &StorageManager::on_gc_finished, dialog_limit, std::move(r_file_stats));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ void StorageManager::create_gc_worker() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StorageManager::on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats, bool dummy) {
|
void StorageManager::on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats) {
|
||||||
if (r_file_stats.is_error()) {
|
if (r_file_stats.is_error()) {
|
||||||
if (r_file_stats.error().code() != 500) {
|
if (r_file_stats.error().code() != 500) {
|
||||||
LOG(ERROR) << "GC failed: " << r_file_stats.error();
|
LOG(ERROR) << "GC failed: " << r_file_stats.error();
|
||||||
|
@ -87,9 +87,9 @@ class StorageManager : public Actor {
|
|||||||
uint32 last_gc_timestamp_ = 0;
|
uint32 last_gc_timestamp_ = 0;
|
||||||
double next_gc_at_ = 0;
|
double next_gc_at_ = 0;
|
||||||
|
|
||||||
void on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats, bool dummy);
|
void on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats);
|
||||||
void create_gc_worker();
|
void create_gc_worker();
|
||||||
void on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats, bool dummy);
|
void on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats);
|
||||||
|
|
||||||
void close_stats_worker();
|
void close_stats_worker();
|
||||||
void close_gc_worker();
|
void close_gc_worker();
|
||||||
|
Reference in New Issue
Block a user