This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import sys | |
import subprocess | |
import json | |
import time | |
from collections import defaultdict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reproduces assert failure when truncating table, either triggered by DROP TABLE or TRUNCATE. | |
# See: https://github.com/scylladb/scylladb/issues/18059 | |
# It's achieved by migrating a tablet away that contains the highest replay position of a shard, | |
# so when drop/truncate happens, the highest replay position will be greater than all the data | |
# found in the table (includes data in memtable). | |
@pytest.mark.asyncio | |
@pytest.mark.parametrize("operation", ['DROP TABLE', 'TRUNCATE']) | |
@skip_mode('release', 'error injections are not supported in release mode') | |
async def test_drop_table_and_truncate_after_migration(manager: ManagerClient, operation): | |
cmdline = [ '--smp=2' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import sys | |
import subprocess | |
import json | |
import time | |
from collections import defaultdict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
from collections import defaultdict | |
import struct | |
import sys | |
import re | |
import uuid | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import binascii | |
import struct | |
import itertools | |
import operator | |
import statistics | |
import textwrap | |
import struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
from collections import defaultdict | |
import struct | |
import sys | |
import re | |
import uuid | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reproducer for https://github.com/scylladb/scylladb/issues/19052 | |
# 1) table A has N tablets and views | |
# 2) migration starts for a tablet of A from node 1 to 2. | |
# 3) migration is at write_both_read_old stage | |
# 4) coordinator will push writes to both nodes | |
# 5) A has view, so writes to it will also result in reads (table::push_view_replica_updates()) | |
# 6) tablet's update_effective_replication_map() is not refreshing tablet sstable set (for new tablet migrating in) | |
# 7) so read on step 5 is not being able to find sstable set for tablet migrating in | |
@pytest.mark.asyncio | |
@skip_mode('release', 'error injections are not supported in release mode') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to run | |
# find /path/to/table -name '*Data.db' -exec echo {} + | xargs scylla sstable dump-statistics | python3 tombstone_dist_per_day.py | |
#!/usr/bin/python3 | |
import json, sys, time | |
from collections import defaultdict | |
inp=sys.stdin | |
l = inp.readline() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
run_with_tablets() { | |
SCYLLA_BINARY_NAME=$1 | |
INITIAL_TABLETS=$2 | |
for i in {1..5}; do | |
echo "$SCYLLA_BINARY_NAME - INITIAL_TABLETS $INITIAL_TABLETS - ITERATION $i..." | |
./build/dev/$SCYLLA_BINARY_NAME perf-simple-query --smp 1 -m 1G --operations-per-shard=100000 --write --tablets --initial-tablets $INITIAL_TABLETS | grep '^median.*insn' >> $SCYLLA_BINARY_NAME-write-tablets-$INITIAL_TABLETS.txt | |
./build/dev/$SCYLLA_BINARY_NAME perf-simple-query --smp 1 -m 1G --operations-per-shard=10000 --flush --bypass-cache --tablets --initial-tablets $INITIAL_TABLETS | grep '^median.*insn' >> $SCYLLA_BINARY_NAME-read-tablets-$INITIAL_TABLETS.txt | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
from collections import defaultdict | |
import struct | |
import sys | |
import re | |
import uuid | |
import time |
NewerOlder