partition_version: remove _schema from partition_entry::operator<<
operator<< accepts a schema& and a partition_entry&. But since the latter now contains a reference to its schema inside, the former is redundant. Remove it.
This commit is contained in:
@@ -644,7 +644,7 @@ std::ostream& operator<<(std::ostream& out, const partition_entry::printer& p) {
|
||||
}
|
||||
out << ") ";
|
||||
}
|
||||
out << fmt::ptr(v) << ": " << mutation_partition_v2::printer(p._schema, v->partition());
|
||||
out << fmt::ptr(v) << ": " << mutation_partition_v2::printer(*v->get_schema(), v->partition());
|
||||
v = v->next();
|
||||
first = false;
|
||||
}
|
||||
|
||||
@@ -613,10 +613,9 @@ public:
|
||||
partition_snapshot::phase_type phase = partition_snapshot::default_phase);
|
||||
|
||||
class printer {
|
||||
const schema& _schema;
|
||||
const partition_entry& _partition_entry;
|
||||
public:
|
||||
printer(const schema& s, const partition_entry& pe) : _schema(s), _partition_entry(pe) { }
|
||||
printer(const partition_entry& pe) : _partition_entry(pe) { }
|
||||
printer(const printer&) = delete;
|
||||
printer(printer&&) = delete;
|
||||
|
||||
|
||||
@@ -868,7 +868,7 @@ std::ostream& operator<<(std::ostream& out, memtable& mt) {
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const memtable_entry& mt) {
|
||||
return out << "{" << mt.key() << ": " << partition_entry::printer(*mt.schema(), mt.partition()) << "}";
|
||||
return out << "{" << mt.key() << ": " << partition_entry::printer(mt.partition()) << "}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1369,6 +1369,6 @@ std::ostream& operator<<(std::ostream& out, const cache_entry& e) {
|
||||
return out << "{cache_entry: " << e.position()
|
||||
<< ", cont=" << e.continuous()
|
||||
<< ", dummy=" << e.is_dummy_entry()
|
||||
<< ", " << partition_entry::printer(*e.schema(), e.partition())
|
||||
<< ", " << partition_entry::printer(e.partition())
|
||||
<< "}";
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ void evict_with_consistency_check(mvcc_container& ms, mvcc_partition& e, const m
|
||||
testlog.trace("evicting");
|
||||
auto ret = ms.tracker()->evict_from_lru_shallow();
|
||||
|
||||
testlog.trace("entry: {}", partition_entry::printer(s, e.entry()));
|
||||
testlog.trace("entry: {}", partition_entry::printer(e.entry()));
|
||||
|
||||
auto p = e.squashed();
|
||||
auto cont = p.get_continuity(s);
|
||||
@@ -553,7 +553,7 @@ SEASTAR_TEST_CASE(test_snapshot_cursor_is_consistent_with_merging) {
|
||||
auto snap2 = e.read();
|
||||
e += m3;
|
||||
|
||||
testlog.trace("e: {}", partition_entry::printer(*e.schema(), e.entry()));
|
||||
testlog.trace("e: {}", partition_entry::printer(e.entry()));
|
||||
|
||||
auto expected = e.squashed();
|
||||
auto snap = e.read();
|
||||
@@ -2005,7 +2005,7 @@ SEASTAR_TEST_CASE(test_apply_to_incomplete_with_dummies) {
|
||||
}
|
||||
});
|
||||
|
||||
testlog.trace("entry @{}: {}", __LINE__, partition_entry::printer(*s, e.entry()));
|
||||
testlog.trace("entry @{}: {}", __LINE__, partition_entry::printer(e.entry()));
|
||||
|
||||
mutation m2(s, ss.make_pkey());
|
||||
// This one covers the dummy row for before(3) and before(2), marking the range [1, 3] as continuous.
|
||||
@@ -2020,7 +2020,7 @@ SEASTAR_TEST_CASE(test_apply_to_incomplete_with_dummies) {
|
||||
e += m3;
|
||||
auto snp3 = e.read();
|
||||
|
||||
testlog.trace("entry @{}: {}", __LINE__, partition_entry::printer(*s, e.entry()));
|
||||
testlog.trace("entry @{}: {}", __LINE__, partition_entry::printer(e.entry()));
|
||||
|
||||
auto expected = m0 + m1 + m2 + m3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user