Warn on DcId change only for server locations.

GitOrigin-RevId: 04f11a63d84882f7c1ccd15a79845b7482c6a451
This commit is contained in:
levlam 2020-03-31 02:16:23 +03:00
parent 409fd70c15
commit 29c81b4252

View File

@ -1394,8 +1394,10 @@ Result<FileId> FileManager::merge(FileId x_file_id, FileId y_file_id, bool no_sy
if (x_node->remote_.full && y_node->remote_.full && !x_node->remote_.full.value().is_web() &&
!y_node->remote_.full.value().is_web() && y_node->remote_.is_full_alive &&
x_node->remote_.full_source == FileLocationSource::FromServer &&
y_node->remote_.full_source == FileLocationSource::FromServer &&
x_node->remote_.full.value().get_dc_id() != y_node->remote_.full.value().get_dc_id()) {
LOG(WARNING) << "File remote location was changed from " << y_node->remote_.full.value() << " to "
LOG(ERROR) << "File remote location was changed from " << y_node->remote_.full.value() << " to "
<< x_node->remote_.full.value();
}
auto count_local = [](auto &node) {