mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Fix bad test 02922_deduplication_with_zero_copy
This commit is contained in:
parent
fe92c92ce6
commit
a49e31a5c2
@ -31,11 +31,11 @@ create table r2 (n int)
|
|||||||
function get_shared_locks()
|
function get_shared_locks()
|
||||||
{
|
{
|
||||||
table_shared_id="$1"
|
table_shared_id="$1"
|
||||||
for part in $($CLICKHOUSE_KEEPER_CLIENT -q "ls /clickhouse/zero_copy/zero_copy_s3/${table_shared_id}")
|
for part in $($CLICKHOUSE_KEEPER_CLIENT -q "ls '/clickhouse/zero_copy/zero_copy_s3/${table_shared_id}'")
|
||||||
do
|
do
|
||||||
for blob in $($CLICKHOUSE_KEEPER_CLIENT -q "ls /clickhouse/zero_copy/zero_copy_s3/${table_shared_id}/${part}")
|
for blob in $($CLICKHOUSE_KEEPER_CLIENT -q "ls '/clickhouse/zero_copy/zero_copy_s3/${table_shared_id}/${part}'")
|
||||||
do
|
do
|
||||||
for lock in $($CLICKHOUSE_KEEPER_CLIENT -q "ls /clickhouse/zero_copy/zero_copy_s3/${table_shared_id}/${part}/${blob}")
|
for lock in $($CLICKHOUSE_KEEPER_CLIENT -q "ls '/clickhouse/zero_copy/zero_copy_s3/${table_shared_id}/${part}/${blob}'")
|
||||||
do
|
do
|
||||||
echo "/clickhouse/zero_copy/zero_copy_s3/${table_shared_id}/${part}/${blob}/${lock}"
|
echo "/clickhouse/zero_copy/zero_copy_s3/${table_shared_id}/${part}/${blob}/${lock}"
|
||||||
done
|
done
|
||||||
@ -48,7 +48,7 @@ function filter_temporary_locks()
|
|||||||
{
|
{
|
||||||
while read -r lock
|
while read -r lock
|
||||||
do
|
do
|
||||||
owner="$($CLICKHOUSE_KEEPER_CLIENT -q "get_stat ${lock}" | grep 'ephemeralOwner' | sed 's/.*= //')"
|
owner="$($CLICKHOUSE_KEEPER_CLIENT -q "get_stat '${lock}'" | grep 'ephemeralOwner' | sed 's/.*= //')"
|
||||||
if [[ "${owner}" -eq "0" ]]
|
if [[ "${owner}" -eq "0" ]]
|
||||||
then
|
then
|
||||||
echo "${lock}"
|
echo "${lock}"
|
||||||
@ -111,7 +111,7 @@ export -f insert_duplicates
|
|||||||
export -f get_shared_locks
|
export -f get_shared_locks
|
||||||
export -f loop
|
export -f loop
|
||||||
|
|
||||||
table_shared_id="$($CLICKHOUSE_KEEPER_CLIENT -q "get /test/02922/${CLICKHOUSE_DATABASE}/table/table_shared_id")"
|
table_shared_id="$($CLICKHOUSE_KEEPER_CLIENT -q "get '/test/02922/${CLICKHOUSE_DATABASE}/table/table_shared_id'")"
|
||||||
|
|
||||||
exit_code=0
|
exit_code=0
|
||||||
timeout 40 bash -c "loop '${table_shared_id}'" || exit_code="${?}"
|
timeout 40 bash -c "loop '${table_shared_id}'" || exit_code="${?}"
|
||||||
@ -128,11 +128,11 @@ function list_keeper_nodes() {
|
|||||||
table_shared_id=$1
|
table_shared_id=$1
|
||||||
|
|
||||||
echo "zero_copy:"
|
echo "zero_copy:"
|
||||||
$CLICKHOUSE_KEEPER_CLIENT -q "ls /clickhouse/zero_copy/zero_copy_s3" | grep -o "${table_shared_id}" | \
|
$CLICKHOUSE_KEEPER_CLIENT -q "ls '/clickhouse/zero_copy/zero_copy_s3'" | grep -o "${table_shared_id}" | \
|
||||||
sed "s/${table_shared_id}/<table_shared_id>/g" || :
|
sed "s/${table_shared_id}/<table_shared_id>/g" || :
|
||||||
|
|
||||||
echo "tables:"
|
echo "tables:"
|
||||||
$CLICKHOUSE_KEEPER_CLIENT -q "ls /test/02922/${CLICKHOUSE_DATABASE}" | grep -o "table" || :
|
$CLICKHOUSE_KEEPER_CLIENT -q "ls '/test/02922/${CLICKHOUSE_DATABASE}'" | grep -o "table" || :
|
||||||
}
|
}
|
||||||
|
|
||||||
list_keeper_nodes "${table_shared_id}"
|
list_keeper_nodes "${table_shared_id}"
|
||||||
|
Loading…
Reference in New Issue
Block a user