Skip to content

Commit bb84f4e

Browse files
authored
Merge pull request #107 from hicder/hieu_remote_compaction_shutting_down
Add shutting_down signal to remote compaction
2 parents c210122 + 5415282 commit bb84f4e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

db/compaction/compaction_job.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,7 @@ void CompactionJob::RunRemote(PluggableCompactionService* service) {
17641764
}
17651765
param.input_files.push_back(files_in_one_level);
17661766
}
1767+
param.shutting_down = shutting_down_;
17671768

17681769
// make the RPC
17691770
status = service->Run(param, &result);

include/rocksdb/pluggable_compaction.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class PluggableCompactionParam {
3939

4040
// The level to which the files are compacted into
4141
int output_level;
42+
43+
// Control whether the DB is shutting down
44+
const std::atomic<bool>* shutting_down;
4245
};
4346

4447
//

0 commit comments

Comments
 (0)