Rafael Ávila de Espíndola
684fb607c4
sstable: handle missing index entry
...
This patch fixes a crash when the index file is corrupted and we get
an empty index entry list.
Tests: unit (release)
Fixes: 2532
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com >
Message-Id: <20190110202833.29333-1-espindola@scylladb.com >
2019-01-14 10:47:21 +01:00
Benny Halevy
b017d87a43
tests: mc: add back missing sstable_3_x_test Statistics.db files
...
To be able to verify the golden version with sstabledump.
These files were generated by running sstable_3_x_test and keeping its
generated output files.
Refs #4043
Signed-off-by: Benny Halevy <bhalevy@scylladb.com >
Message-Id: <20190103112511.23488-2-bhalevy@scylladb.com >
2019-01-07 12:56:16 +00:00
Benny Halevy
517ad58823
tests: mc: delete empty line from write_static_row/mc-1-big-TOC.txt
...
Refs #4043
Signed-off-by: Benny Halevy <bhalevy@scylladb.com >
Message-Id: <20190103112511.23488-1-bhalevy@scylladb.com >
2019-01-07 12:56:16 +00:00
Rafael Ávila de Espíndola
28c014351f
Fix crash on corrupt sstable
...
The check in consume_range_tombstone was too late. Before getting to
it we would fail an assert calling to_bound_kind.
This moves the check earlier and adds a testcase.
Tests: unit (release)
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com >
2019-01-02 17:52:07 -08:00
Rafael Ávila de Espíndola
f8c81d4d89
tests: sstables: mc: add tests with incompatible schemas
...
In one test the types in the schema don't match the types in the
statistics file. In another a column is missing.
The patch also updates the exceptions to have more human readable
messages.
Tests: unit (release)
Part of issue #3960 .
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com >
Message-Id: <20181219233046.74229-1-espindola@scylladb.com >
2018-12-25 11:11:54 +02:00
Rafael Ávila de Espíndola
b93d8d863d
Add a test with mismatched timestamps.
...
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com >
Message-Id: <20181218035931.3554-1-espindola@scylladb.com >
2018-12-18 11:30:56 +01:00
Rafael Ávila de Espíndola
4de14e6143
Add tests on broken mc range tombstones.
...
This tests that we diagnose both two consecutive range starts and two
consecutive range ends.
Message-Id: <20181214212608.95452-1-espindola@scylladb.com >
2018-12-15 13:53:25 +01:00
Rafael Ávila de Espíndola
51fd880892
Add tests for broken start and end composite markers.
2018-12-13 10:29:44 +01:00
Tomasz Grabiec
1dd2bf52ca
Merge "Add a couple of tests of broken sstables" From Rafael
...
These are the current uninteresting cases I found when looking at
malformed_sstable_exception. The existing code is working, just not
being tested.
* https://github.com/espindola/scylla.git espindola/espindola/broken-sst:
Add a broken sstable test.
Add a test with mismatched schema.
2018-12-10 19:30:58 +01:00
Vladimir Krivopalov
98ae39f920
tests: Delete unused (bogus) Statistics.db file from write_ SST3 tests.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
dcd639b4d5
tests: Add stats metadata validation to write_two_non_adjacent_range_tombstones
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
d07ab3b3ef
tests: Add stats metadata validation to write_range_tombstone_same_end_with_row
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
b856cf837e
tests: Add stats metadata validation to write_range_tombstone_same_start_with_row
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
ba24572fb6
tests: Add stats metadata validation to write_adjacent_range_tombstones_with_rows
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
4167c9e51d
tests: Add stats metadata validation to write_mixed_rows_and_range_tombstones
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
fd1c9b84c6
tests: Add stats metadata validation to write_non_adjacent_range_tombstones
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
1a6d613654
tests: Add stats metadata validation to write_adjacent_range_tombstones
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
57d2d1a1c6
tests: Add stats metadata validation to write_simple_range_tombstone
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
bc5d5633dc
tests: Add stats metadata validation to write_user_defined_type_table
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
d9f2829ca0
tests: Add stats metadata validation to write_compact_table
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
3a1e287c6a
tests: Add stats metadata validation to write_large_clustering_key
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
722fc7222a
tests: Add stats metadata validation to write_empty_clustering_values
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
1367243b7e
tests: Add stats metadata validation to write_different_types
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
12b10c0cca
tests: Add stats metadata validation to write_missing_columns_large_set
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
c990c518fc
tests: Add stats metadata validation to write_multiple_rows
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
9bb46f7cc6
tests: Add stats metadata validation to write_multiple_partitions
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
99d3cbd2fc
tests: Add stats metadata validation to write_collection_incremental_update
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
0118b15c06
tests: Add stats metadata validation to write_collection_wide_update
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
85782ed729
tests: Add stats metadata validation to write_deleted_row
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
66913adcc6
tests: Add stats metadata validation to write_deleted_column
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
997101f105
tests: Add stats metadata validation to write_ttled_column
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
a018388049
tests: Add stats metadata validation to write_ttled_row
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
260dfb3492
tests: Add stats metadata validation to test_write_wide_partitions.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
349a73c464
tests: Add stats metadata validation to test_write_composite_clustering_key.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
4f14e65d70
tests: Add stats metadata validation to test_write_composite_partition_key.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Vladimir Krivopalov
a7b85e8009
tests: Add stats metadata validation to test_write_static_row.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-12-06 16:40:27 -08:00
Rafael Ávila de Espíndola
298873d33b
Add a test with mismatched schema.
...
The sstable in the test is fine, but the schema thinks a static column
is regular.
2018-12-06 15:38:01 -08:00
Rafael Ávila de Espíndola
d392bc4924
Add a broken sstable test.
...
This sstable has a static column with clustering information.
2018-12-06 15:23:33 -08:00
Tomasz Grabiec
b8c405c019
Merge "Correct the usage of row ttl and add write-read test" from Piotr
...
Fixes the condition which determines whether a row ttl should be used for a cell
and adds a test that uses each generated mutation to populate mutation source
and then verifies that it can read back the same mutation.
* seastar-dev.git haaawk/sst3/write-read-test/v3:
Fix use_row_ttl condition
Add test_all_data_is_read_back
2018-12-04 19:47:28 +01:00
Piotr Jastrzebski
75b99838fc
Fix use_row_ttl condition
...
Previous condition was wrong and was using row ttl too often.
We also have to change test_dead_row_marker to compare
resulting sstable with sstable generated by Origin not
by sstableupgrade.
This is because sstableupgrade transmits information about deleted row
marker automatically to cells in that row.
Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com >
2018-12-04 10:51:36 +01:00
Rafael Ávila de Espíndola
21199a7a5c
Add a filename to a malformed_sstable_exception.
...
It is reasonable for parse() to throw when it finds something wrong
with the format. This seems to be the best spot to add the filename
and rethrow.
Also add a testcase to make sure we keep handling this error
gracefully.
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com >
2018-12-03 13:50:23 -08:00
Rafael Ávila de Espíndola
a6e25e4bd0
Try to read the full sst in broken_sst.
...
With this patch we use data_consume_rows to try to read the entire
sstable. The patch also adds a test with a particular corruption that
would not be found without parsing the file.
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com >
2018-12-03 13:47:49 -08:00
Vladimir Krivopalov
d24875b736
tests: Add test reading SSTables in 'mc' format with missing summary.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-11-30 11:56:56 -08:00
Piotr Jastrzebski
92ffccd636
sstables: Remove unused sstable test files
...
Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com >
2018-11-26 13:35:15 +01:00
Vladimir Krivopalov
69b453fb69
tests: Test writing empty static rows for partitions in tables with static columns.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-11-05 13:47:30 -08:00
Vladimir Krivopalov
d82ac02fad
tests: Add test covering inverleaved atomic and collection cells in static row.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-10-29 15:01:34 -07:00
Vladimir Krivopalov
f3dc2a4927
tests: Test interleaved atomic and multi-cell columns written to SSTables 3.x.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-10-26 16:58:34 -07:00
Vladimir Krivopalov
9843343ad8
tests: Add test for a static row with missing columns (SStables 3.x.).
...
This is a test case for #3892 .
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-10-25 17:16:31 -07:00
Vladimir Krivopalov
ad599d4342
tests: Add tests writing both regular and shadowable tombstones to SSTables 3.x.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-10-23 16:30:42 -07:00
Vladimir Krivopalov
3dcf0acfc2
tests: Add test covering writing and reading a shadowable tombstone with SSTables 3.x.
...
Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com >
2018-10-23 16:30:42 -07:00