This commit is contained in:
Evgeniy Gatov 2014-07-07 15:54:51 +04:00
commit 1d620af836
3 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,8 @@ public:
time_t min_date_time = DateLUTSingleton::instance().fromDayNum(DayNum_t(current_block.min_date));
String month_name = toString(Date2OrderedIdentifier(min_date_time) / 100);
storage.zookeeper->tryCreate(storage.zookeeper_path + "/block_numbers/" + month_name, "", zkutil::CreateMode::Persistent);
storage.zookeeper->createIfNotExists(storage.zookeeper_path + "/block_numbers/" + month_name, "",
zkutil::CreateMode::Persistent);
AbandonableLockInZooKeeper block_number_lock(
storage.zookeeper_path + "/block_numbers/" + month_name + "/block-",

View File

@ -1416,7 +1416,7 @@ void StorageReplicatedMergeTree::drop()
replica_is_active_node = nullptr;
zookeeper->tryRemoveRecursive(replica_path);
/// Проверяем, что zookeeper_pathсуществует: его могла удалить другая реплика после выполнения предыдущей строки.
/// Проверяем, что zookeeper_path существует: его могла удалить другая реплика после выполнения предыдущей строки.
Strings replicas;
if (zookeeper->tryGetChildren(zookeeper_path + "/replicas", replicas) == ZOK && replicas.empty())
{

View File

@ -30,6 +30,8 @@ for m in parts:
if x1 >= x2 and y1 <= y2 and l1 < l2 and (x1, y1) != (x2, y2): # 2 contains 1
pass
elif x1 > y2: # 1 is to the right of 2
if x1 != y2 + 1:
print # чтобы на глаз было видно пропущенные номера
(x2, y2, l2, s2) = (x1, y1, l1, s1)
print s1
else: