everywhere: cleanup defer.hh includes
Get rid of unused includes of seastar/util/{defer,closeable}.hh
and add a few that are missing from source files.
Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <gnutls/crypto.h>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include "hashers.hh"
|
||||
#include "bytes.hh"
|
||||
#include "alternator/auth.hh"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <seastar/http/short_streams.hh>
|
||||
#include <seastar/core/coroutine.hh>
|
||||
#include <seastar/json/json_elements.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include "seastarx.hh"
|
||||
#include "error.hh"
|
||||
#include "utils/rjson.hh"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <boost/range/irange.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <seastar/core/thread.hh>
|
||||
#include <seastar/core/metrics.hh>
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <seastar/core/coroutine.hh>
|
||||
#include <seastar/core/reactor.hh>
|
||||
#include <seastar/core/metrics.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/algorithm/string/erase.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include <seastar/core/sleep.hh>
|
||||
#include <seastar/core/coroutine.hh>
|
||||
#include <seastar/net/byteorder.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
#include "seastarx.hh"
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <boost/range/adaptor/map.hpp>
|
||||
#include "view_update_generator.hh"
|
||||
#include "service/priority_manager.hh"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <seastar/util/closeable.hh>
|
||||
#include "distributed_loader.hh"
|
||||
#include "database.hh"
|
||||
#include "db/config.hh"
|
||||
@@ -386,9 +387,7 @@ distributed_loader::process_upload_dir(distributed<database>& db, distributed<db
|
||||
|
||||
}).get();
|
||||
|
||||
auto stop = defer([&directory] {
|
||||
directory.stop().get();
|
||||
});
|
||||
auto stop = deferred_stop(directory);
|
||||
|
||||
lock_table(directory, db, ks, cf).get();
|
||||
process_sstable_dir(directory).get();
|
||||
@@ -454,9 +453,7 @@ distributed_loader::get_sstables_from_upload_dir(distributed<database>& db, sstr
|
||||
|
||||
}).get();
|
||||
|
||||
auto stop = defer([&directory] {
|
||||
directory.stop().get();
|
||||
});
|
||||
auto stop = deferred_stop(directory);
|
||||
|
||||
std::vector<std::vector<sstables::shared_sstable>> sstables_on_shards(smp::count);
|
||||
lock_table(directory, db, ks, cf).get();
|
||||
@@ -538,9 +535,7 @@ future<> distributed_loader::populate_column_family(distributed<database>& db, s
|
||||
return global_table->make_sstable(dir.native(), gen, v, f);
|
||||
}).get();
|
||||
|
||||
auto stop = defer([&directory] {
|
||||
directory.stop().get();
|
||||
});
|
||||
auto stop = deferred_stop(directory);
|
||||
|
||||
lock_table(directory, db, ks, cf).get();
|
||||
process_sstable_dir(directory).get();
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include <seastar/util/closeable.hh>
|
||||
|
||||
#include "frozen_mutation.hh"
|
||||
#include "mutation_partition.hh"
|
||||
#include "mutation.hh"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <boost/intrusive/set.hpp>
|
||||
#include <iterator>
|
||||
#include <boost/intrusive/parent_from_member.hpp>
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <seastar/util/closeable.hh>
|
||||
|
||||
#include "memtable.hh"
|
||||
#include "database.hh"
|
||||
#include "frozen_mutation.hh"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <stack>
|
||||
#include <boost/range/algorithm/heap_algorithm.hpp>
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
#include "mutation.hh"
|
||||
#include "mutation_fragment.hh"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include "mutation_partition.hh"
|
||||
#include "clustering_interval_set.hh"
|
||||
#include "converting_mutation_partition_applier.hh"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include <boost/range/algorithm/heap_algorithm.hpp>
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
#include "partition_version.hh"
|
||||
#include "row_cache.hh"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <seastar/core/seastar.hh>
|
||||
#include <seastar/net/byteorder.hh>
|
||||
#include <seastar/core/execution_stage.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <seastar/core/metrics_registration.hh>
|
||||
#include <seastar/core/coroutine.hh>
|
||||
#include <seastar/util/closeable.hh>
|
||||
#include <seastar/core/sleep.hh>
|
||||
|
||||
logging::logger rlogger("repair");
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <seastar/util/defer.hh>
|
||||
#include "repair/repair.hh"
|
||||
#include "message/messaging_service.hh"
|
||||
#include "sstables/sstables.hh"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "utils/allocation_strategy.hh"
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
//
|
||||
// ~~ Definitions ~~
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include <seastar/core/rwlock.hh>
|
||||
#include <seastar/core/sstring.hh>
|
||||
#include <seastar/core/shared_ptr.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include "utils/atomic_vector.hh"
|
||||
|
||||
class keyspace_metadata;
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <seastar/core/coroutine.hh>
|
||||
#include <seastar/core/on_internal_error.hh>
|
||||
#include <seastar/util/log.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
namespace service {
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <seastar/core/sleep.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include "partition_range_compat.hh"
|
||||
#include "db/consistency_level.hh"
|
||||
#include "db/commitlog/commitlog.hh"
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "storage_service.hh"
|
||||
#include "dht/boot_strapper.hh"
|
||||
#include <seastar/core/distributed.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include "locator/snitch_base.hh"
|
||||
#include "db/system_keyspace.hh"
|
||||
#include "db/system_distributed_keyspace.hh"
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
#include <boost/icl/interval_map.hpp>
|
||||
#include <boost/range/adaptor/map.hpp>
|
||||
#include <boost/range/algorithm/remove_if.hpp>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <seastar/testing/thread_test_case.hh>
|
||||
#include <string>
|
||||
#include <boost/range/adaptor/map.hpp>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <seastar/core/do_with.hh>
|
||||
#include <seastar/core/print.hh>
|
||||
#include <seastar/core/thread.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
|
||||
#include <seastar/json/json_elements.hh>
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include <seastar/core/sstring.hh>
|
||||
#include <seastar/core/future.hh>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <seastar/util/log.hh>
|
||||
|
||||
#include "utils/updateable_value.hh"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/intrusive/parent_from_member.hpp>
|
||||
#include <seastar/util/defer.hh>
|
||||
#include <seastar/util/alloc_failure_injector.hh>
|
||||
#include <cassert>
|
||||
#include <fmt/core.h>
|
||||
|
||||
Reference in New Issue
Block a user