forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tombstone_gc.hh: remove include of boost/icl/interval_map.hh
tombstone_gc.hh is relatively lightweight and is used in many places, but it includes the heavyweight boost/icl/interval_map.hh. Lighten the load for its users by wrapping lw_shared_ptr<some icl map type> in a forward-declared class. Define the class in a new header tombstone_gc-internals.hh, to be used by the two translation units that need it. Ref #1. Closes scylladb#21706
- Loading branch information
Showing
4 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (C) 2024-present ScyllaDB | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
#include "tombstone_gc.hh" | ||
#include <boost/icl/interval_map.hpp> | ||
|
||
using repair_history_map = boost::icl::interval_map<dht::token, gc_clock::time_point, boost::icl::partial_absorber, std::less, boost::icl::inplace_max>; | ||
|
||
class repair_history_map_ptr { | ||
lw_shared_ptr<repair_history_map> _ptr; | ||
public: | ||
repair_history_map_ptr() = default; | ||
repair_history_map_ptr(lw_shared_ptr<repair_history_map> ptr) : _ptr(std::move(ptr)) {} | ||
repair_history_map& operator*() const { return _ptr.operator*(); } | ||
repair_history_map* operator->() const { return _ptr.operator->(); } | ||
explicit operator bool() const { return _ptr.operator bool(); } | ||
}; | ||
|
||
|
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
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