Skip to content

Commit

Permalink
fix logging
Browse files Browse the repository at this point in the history
Signed-off-by: JaySon-Huang <[email protected]>
  • Loading branch information
JaySon-Huang committed Mar 28, 2023
1 parent 3b44112 commit eab7ff1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dbms/src/Storages/S3/S3GCManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ void S3GCManager::physicalRemoveDataFile(const String & datafile_key)
{
// CheckpointDataFile is a single object, remove it.
deleteObject(*client, datafile_key);
LOG_INFO(sub_logger, "datafile deleted, key={}", datafile_key);
LOG_INFO(sub_logger, "datafile deleted");
}
else
{
Expand All @@ -541,13 +541,14 @@ void S3GCManager::physicalRemoveDataFile(const String & datafile_key)
// only the sub objects of given key of this DMFile.
// TODO: If GCManager unexpectedly exit in the middle, it will leave some broken
// sub file for DMFile, try clean them later.
S3::listPrefix(*client, datafile_key + "/", [&client, &datafile_key, &sub_logger](const Aws::S3::Model::Object & object) {
std::vector<String> sub_keys;
S3::listPrefix(*client, datafile_key + "/", [&client, &sub_logger](const Aws::S3::Model::Object & object) {
const auto & sub_key = object.GetKey();
deleteObject(*client, sub_key);
LOG_INFO(sub_logger, "datafile deleted, sub_key={}", datafile_key, sub_key);
LOG_INFO(sub_logger, "datafile deleted, sub_key={}", sub_key);
return PageResult{.num_keys = 1, .more = true};
});
LOG_INFO(sub_logger, "datafile deleted, all sub keys are deleted", datafile_key);
LOG_INFO(sub_logger, "datafile deleted, all sub keys are deleted");
}
}

Expand Down

0 comments on commit eab7ff1

Please sign in to comment.