From a74f14b55088a9940f32e5fa06366a61fbf7c599 Mon Sep 17 00:00:00 2001 From: sdong Date: Wed, 18 May 2022 11:23:12 -0700 Subject: [PATCH] Log error message when LinkFile() is not supported when ingesting files (#10010) Summary: Right now, whether moving file is skipped due to LinkFile() is not supported is opaque to users. Add a log message to help users debug. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10010 Test Plan: Run existing test. Manual test verify the log message printed out. Reviewed By: riversand963 Differential Revision: D36463237 fbshipit-source-id: b00bd5041bd5c11afa4e326819c8461ee2c98a91 --- db/external_sst_file_ingestion_job.cc | 3 +++ db/import_column_family_job.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/db/external_sst_file_ingestion_job.cc b/db/external_sst_file_ingestion_job.cc index 51b636678..7a93a2dc4 100644 --- a/db/external_sst_file_ingestion_job.cc +++ b/db/external_sst_file_ingestion_job.cc @@ -142,6 +142,9 @@ Status ExternalSstFileIngestionJob::Prepare( ingestion_options_.failed_move_fall_back_to_copy) { // Original file is on a different FS, use copy instead of hard linking. f.copy_file = true; + ROCKS_LOG_INFO(db_options_.info_log, + "Triy to link file %s but it's not supported : %s", + path_outside_db.c_str(), status.ToString().c_str()); } } else { f.copy_file = true; diff --git a/db/import_column_family_job.cc b/db/import_column_family_job.cc index 951fc3819..4c6edc63d 100644 --- a/db/import_column_family_job.cc +++ b/db/import_column_family_job.cc @@ -97,6 +97,9 @@ Status ImportColumnFamilyJob::Prepare(uint64_t next_file_number, if (status.IsNotSupported()) { // Original file is on a different FS, use copy instead of hard linking hardlink_files = false; + ROCKS_LOG_INFO(db_options_.info_log, + "Try to link file %s but it's not supported : %s", + f.internal_file_path.c_str(), status.ToString().c_str()); } } if (!hardlink_files) {