Revert 'Compact staging sstables'
This patch reverts the following patches merged in78750c2e1a"Merge 'Compact staging sstables' from Benny Halevy" >597e415c38"table: clone staging sstables into table dir" >ce5bd505dc"view_update_generator: discover_staging_sstables: reindent" >59874b2837"table: add get_staging_sstables" >7536dd7f00"distributed_loader: populate table directory first" The feature causes regressions seen with e.g. https://jenkins.scylladb.com/view/master/job/scylla-master/job/dtest-daily-release/41/testReport/materialized_views_test/TestMaterializedViews/Run_Dtest_Parallel_Cloud_Machines___FullDtest___full_split011___test_base_replica_repair/ ``` AssertionError: Expected [[0, 0, 'a', 3.0]] from SELECT * FROM t_by_v WHERE v = 0, but got [] ``` Where views aren't updated properly. Apparently since `table::stream_view_replica_updates` doesn't exclude the staging sstables anymore and since they are cloned to the base table as new sstables it seems to the view builder that no view updates are required since there's no changes comparing to the base table. Reopens #9559 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Closes #10890
This commit is contained in:
committed by
Botond Dénes
parent
8bccd5e9c5
commit
81fa1ce9a1
@@ -113,7 +113,7 @@ future<> view_update_generator::start() {
|
||||
auto& [t, sstables] = *it;
|
||||
try {
|
||||
inject_failure("view_update_generator_move_staging_sstable");
|
||||
t->remove_sstables_from_staging(sstables).get();
|
||||
t->move_sstables_from_staging(sstables).get();
|
||||
} catch (...) {
|
||||
// Move from staging will be retried upon restart.
|
||||
vug_logger.warn("Moving some sstable from staging failed: {}. Ignoring...", std::current_exception());
|
||||
@@ -173,13 +173,13 @@ void view_update_generator::setup_metrics() {
|
||||
void view_update_generator::discover_staging_sstables() {
|
||||
for (auto& x : _db.get_column_families()) {
|
||||
auto t = x.second->shared_from_this();
|
||||
const auto& sstables = t->get_staging_sstables();
|
||||
_sstables_with_tables[t].reserve(_sstables_with_tables[t].size() + sstables.size());
|
||||
for (auto& sst : sstables | boost::adaptors::map_values) {
|
||||
_sstables_with_tables[t].push_back(sst);
|
||||
// we're at early stage here, no need to kick _pending_sstables (the
|
||||
// bulding fiber is not running), neither we can wait on the semaphore
|
||||
_registration_sem.consume(1);
|
||||
for (auto sstables = t->get_sstables(); sstables::shared_sstable sst : *sstables) {
|
||||
if (sst->requires_view_building()) {
|
||||
_sstables_with_tables[t].push_back(std::move(sst));
|
||||
// we're at early stage here, no need to kick _pending_sstables (the
|
||||
// bulding fiber is not running), neither we can wait on the semaphore
|
||||
_registration_sem.consume(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user