Skip to content

Commit 003b98f

Browse files
author
Duc Hieu Pham
committed
Fix remote compaction time reporting
Summary: Right now we measure time taken to `RunRemote` for compaction without `InstallFiles`. We need to measure that as well. Test Plan: travis Reviewers: dhruba, igor Reviewed By: igor Differential Revision: https://rockset.phacility.com/D6006
1 parent d658954 commit 003b98f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db/compaction/compaction_job.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,6 @@ void CompactionJob::RunRemote(PluggableCompactionService* service) {
17161716
status = service->Run(param, &result);
17171717

17181718
// update compaction stats
1719-
compaction_stats_.micros = env_->NowMicros() - start_micros;
17201719
compaction_stats_.cpu_micros = 0;
17211720
for (size_t i = 0; i < compact_->sub_compact_states.size(); i++) {
17221721
compaction_stats_.cpu_micros +=
@@ -1760,6 +1759,7 @@ void CompactionJob::RunRemote(PluggableCompactionService* service) {
17601759
// Install all remotely compacted file into local files.
17611760
auto statuses =
17621761
service->InstallFiles(sources, destinations, env_options_, env_);
1762+
compaction_stats_.micros = env_->NowMicros() - start_micros;
17631763

17641764
for (uint32_t i = 0; i < statuses.size(); ++i) {
17651765
if (!statuses[i].ok()) {

0 commit comments

Comments
 (0)