database: make certain column family functions const qualified

Reviewed-by: Nadav Har'El <nyh@scylladb.com>
Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
This commit is contained in:
Raphael S. Carvalho
2016-07-08 14:45:36 -03:00
parent bfc5376548
commit e38f66c6fe
2 changed files with 6 additions and 6 deletions

View File

@@ -1199,7 +1199,7 @@ void column_family::set_compaction_strategy(sstables::compaction_strategy_type s
_sstables = std::move(new_sstables);
}
size_t column_family::sstables_count() {
size_t column_family::sstables_count() const {
return _sstables->all()->size();
}
@@ -1210,7 +1210,7 @@ int64_t column_family::get_unleveled_sstables() const {
return 0;
}
lw_shared_ptr<sstable_list> column_family::get_sstables() {
lw_shared_ptr<sstable_list> column_family::get_sstables() const {
return _sstables->all();
}
@@ -1221,7 +1221,7 @@ lw_shared_ptr<sstable_list> column_family::get_sstables() {
// As long as we haven't deleted them, compaction needs to ensure it doesn't
// garbage-collect a tombstone that covers data in an sstable that may not be
// successfully deleted.
lw_shared_ptr<sstable_list> column_family::get_sstables_including_compacted_undeleted() {
lw_shared_ptr<sstable_list> column_family::get_sstables_including_compacted_undeleted() const {
if (_sstables_compacted_but_not_deleted.empty()) {
return get_sstables();
}

View File

@@ -653,9 +653,9 @@ public:
_config.enable_incremental_backups = val;
}
lw_shared_ptr<sstable_list> get_sstables();
lw_shared_ptr<sstable_list> get_sstables_including_compacted_undeleted();
size_t sstables_count();
lw_shared_ptr<sstable_list> get_sstables() const;
lw_shared_ptr<sstable_list> get_sstables_including_compacted_undeleted() const;
size_t sstables_count() const;
int64_t get_unleveled_sstables() const;
void start_compaction();