From ee925c13a6a870adfbfef01ae42bed2119e29b96 Mon Sep 17 00:00:00 2001 From: Zhiru Zhu Date: Tue, 10 Mar 2020 09:35:34 +0800 Subject: [PATCH] update Signed-off-by: Zhiru Zhu --- core/src/codecs/default/DefaultDeletedDocsFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/codecs/default/DefaultDeletedDocsFormat.cpp b/core/src/codecs/default/DefaultDeletedDocsFormat.cpp index 190600af05..0b0039cd4f 100644 --- a/core/src/codecs/default/DefaultDeletedDocsFormat.cpp +++ b/core/src/codecs/default/DefaultDeletedDocsFormat.cpp @@ -43,7 +43,7 @@ DefaultDeletedDocsFormat::read(const store::DirectoryPtr& directory_ptr, segment int del_fd = open(del_file_path.c_str(), O_RDONLY, 00664); if (del_fd == -1) { - std::string err_msg = "Failed to open file: " + del_file_path; + std::string err_msg = "Failed to open file: " + del_file_path + ", error: " + std::strerror(errno); ENGINE_LOG_ERROR << err_msg; throw Exception(SERVER_CANNOT_CREATE_FILE, err_msg); } @@ -91,7 +91,7 @@ DefaultDeletedDocsFormat::write(const store::DirectoryPtr& directory_ptr, const // Write to the temp file, in order to avoid possible race condition with search (concurrent read and write) int del_fd = open(temp_path.c_str(), O_RDWR | O_CREAT, 00664); if (del_fd == -1) { - std::string err_msg = "Failed to open file: " + temp_path; + std::string err_msg = "Failed to open file: " + temp_path + ", error: " + std::strerror(errno); ENGINE_LOG_ERROR << err_msg; throw Exception(SERVER_CANNOT_CREATE_FILE, err_msg); }