fix case style for local variable

This commit is contained in:
songenjie 2021-04-13 17:34:04 +08:00
parent 520f4f39ec
commit 7c32cc1e18
2 changed files with 5 additions and 5 deletions

View File

@ -5387,9 +5387,9 @@ void StorageReplicatedMergeTree::fetchPartition(
if (fetch_part) if (fetch_part)
{ {
String part_name = partition->as<ASTLiteral &>().value.safeGet<String>(); String part_name = partition->as<ASTLiteral &>().value.safeGet<String>();
auto replica_path_ = findReplicaHavingPart(part_name, from, zookeeper); auto part_path = findReplicaHavingPart(part_name, from, zookeeper);
if (replica_path_.empty()) if (part_path.empty())
throw Exception("fetch part " + part_name + " not exists !", ErrorCodes::PART_DOESNT_EXIST); throw Exception("fetch part " + part_name + " not exists !", ErrorCodes::PART_DOESNT_EXIST);
/** Let's check that there is no such part in the `detached` directory (where we will write the downloaded parts). /** Let's check that there is no such part in the `detached` directory (where we will write the downloaded parts).
* Unreliable (there is a race condition) - such a part may appear a little later. * Unreliable (there is a race condition) - such a part may appear a little later.
@ -5400,8 +5400,8 @@ void StorageReplicatedMergeTree::fetchPartition(
try try
{ {
/// part name , metadata, replica path , true, 0, zookeeper /// part name , metadata, part_path , true, 0, zookeeper
if (!fetchPart(part_name, metadata_snapshot, replica_path_, true, 0, zookeeper)) if (!fetchPart(part_name, metadata_snapshot, part_path, true, 0, zookeeper))
throw Exception("fetch part " + part_name + " failed! ", ErrorCodes::UNFINISHED); throw Exception("fetch part " + part_name + " failed! ", ErrorCodes::UNFINISHED);
} }
catch (const DB::Exception & e) catch (const DB::Exception & e)

View File

@ -522,7 +522,7 @@ private:
/** Returns an empty string if no one has a part. /** Returns an empty string if no one has a part.
*/ */
String findReplicaHavingPart(const String & part_name, bool active); String findReplicaHavingPart(const String & part_name, bool active);
String findReplicaHavingPart(const String & part_name, const String & zookeeper_path_, zkutil::ZooKeeper::Ptr zookeeper_); static String findReplicaHavingPart(const String & part_name, const String & zookeeper_path_, zkutil::ZooKeeper::Ptr zookeeper_);
bool checkReplicaHavePart(const String & replica, const String & part_name); bool checkReplicaHavePart(const String & replica, const String & part_name);
bool checkDetachPartIfExists(const String & part_name); bool checkDetachPartIfExists(const String & part_name);