throwException("Disk move factor have to be in [0., 1.] interval, but set to "+toString(move_factor),ErrorCodes::LOGICAL_ERROR);
throwException("Disk move factor have to be in [0., 1.] interval, but set to "+toString(move_factor)+" in storage policy "+backQuote(name),ErrorCodes::LOGICAL_ERROR);
throwException("StoragePolicy must contain at least one Volume.",ErrorCodes::UNKNOWN_POLICY);
throwException("Storage policy "+backQuote(name)+" must contain at least one Volume.",ErrorCodes::NO_ELEMENTS_IN_CONFIG);
if(move_factor>1)
throwException("Disk move factor have to be in [0., 1.] interval, but set to "+toString(move_factor),ErrorCodes::LOGICAL_ERROR);
throwException("Disk move factor have to be in [0., 1.] interval, but set to "+toString(move_factor)+" in storage policy "+backQuote(name),ErrorCodes::LOGICAL_ERROR);
throwException("Volumes names must be unique ("+volumes[i]->getName()+" duplicated).",ErrorCodes::UNKNOWN_POLICY);
throwException("Volumes names must be unique in storage policy "+backQuote(name)+" ("+volumes[i]->getName()+" duplicated).",ErrorCodes::UNKNOWN_POLICY);
returnnode.query("select disk_name from system.parts where table == '{}' and active=1 order by modification_time".format(table_name)).strip().split('\n')
defget_used_parts_for_table(node,table_name):
returnnode.query("SELECT name FROM system.parts WHERE table = '{}' AND active = 1 ORDER BY modification_time".format(table_name)).splitlines()
assertint(*node1.query("""SELECT max_data_part_size FROM system.storage_policies WHERE policy_name = 'jbods_with_external' AND volume_name = 'main'""").splitlines())==10*1024*1024
returnlist(map(int,node.query("SELECT allow_merges FROM system.storage_policies WHERE policy_name = '{}' ORDER BY volume_priority".format(storage_policy)).splitlines()))