scylladb / scylla-tools-java

Apache Cassandra, supplying tools for Scylla
Apache License 2.0
53 stars 85 forks source link

sstableutli -type final and sstableutil -type tmp return incorrect results #309

Open aleksbykov opened 2 years ago

aleksbykov commented 2 years ago

Dtest: sstableutil_test.py::TestSSTableUtil::test_abortedcompaction failed because list of sstables are different.

Test itself Run compaction and then terminate this process by killing node. These cause number of tmp sstable files to appear. But the result of sstableutil --type all and sstableutil -type final return same results, while sstableutil --type tmp return zero files

15:37:29,645 sstableutil_test INFO sstableutil_test.py:166 | All parameters ['/home/abykov/.ccm/scylla-repository/unstable/master/latest/scylla-tools-java/bin/sstableutil', '--type', 'all', 'keyspace1', 'standard1'] 15:37:32,874 sstableutil_test INFO sstableutil_test.py:179 | Got 75 files 15:37:32,875 sstableutil_test INFO sstableutil_test.py:153 | About to invoke sstableutil... 15:37:32,875 sstableutil_test INFO sstableutil_test.py:166 | All parameters ['/home/abykov/.ccm/scylla-repository/unstable/master/latest/scylla-tools-java/bin/sstableutil', '--type', 'final', 'keyspace1', 'standard1'] 15:37:35,951 sstableutil_test INFO sstableutil_test.py:179 | Got 75 files 15:37:35,952 sstableutil_test INFO sstableutil_test.py:153 | About to invoke sstableutil... 15:37:35,952 sstableutil_test INFO sstableutil_test.py:166 | All parameters ['/home/abykov/.ccm/scylla-repository/unstable/master/latest/scylla-tools-java/bin/sstableutil', '--type', 'tmp', 'keyspace1', 'standard1'] 15:37:38,469 sstableutil_test INFO sstableutil_test.py:176 | b'Listing files...\n' 15:37:38,469 sstableutil_test INFO sstableutil_test.py:179 | Got 0 files 15:37:38,469 sstableutil_test INFO sstableutil_test.py:153 | About to invoke sstableutil... 15:37:38,470 sstableutil_test INFO sstableutil_test.py:166 | All parameters ['/home/abykov/.ccm/scylla-repository/unstable/master/latest/scylla-tools-java/bin/sstableutil', '--type', 'tmp', '--oplog', 'keyspace1', 'standard1'] 15:37:40,951 sstableutil_test INFO sstableutil_test.py:176 | b'Listing files...\n' 15:37:40,952 sstableutil_test INFO sstableutil_test.py:179 | Got 0 files 15:37:40,952 sstableutil_test INFO sstableutil_test.py:134 | Comparing all files...

E         Right contains one more item: '/home/abykov/.dtest/dtest-w8u2_uad/test/node1/data/keyspace1/standard1-0219e1a0372d11edb83aa97c5c0425f1/me-9-big-TOC.txt.tmp'
E         Full diff:
E           [

to run test use next command:

pytest -s -vvv  -p "no:email_plugin" --scylla-version=unstable/master:latest --keep-test-dir sstableutil_test.py::TestSSTableUtil::test_abortedcompaction