Add asserts

This commit is contained in:
jbajic 2022-12-12 15:46:41 +01:00
parent 0d856bee45
commit b0c4544287
4 changed files with 3 additions and 20 deletions

View File

@ -34,13 +34,13 @@ struct Edge {
PropertyStore properties;
bool deleted;
uint8_t PAD;
// uint8_t PAD;
// uint16_t PAD;
Delta *delta;
};
// static_assert(alignof(Edge) >= 8, "The Edge should be aligned to at least 8!");
static_assert(alignof(Edge) >= 8, "The Edge should be aligned to at least 8!");
inline bool operator==(const Edge &first, const Edge &second) { return first.gid == second.gid; }
inline bool operator<(const Edge &first, const Edge &second) { return first.gid < second.gid; }

View File

@ -368,12 +368,6 @@ LabelIndex::Iterable::Iterable(utils::SkipList<Entry>::Accessor index_accessor,
config_(config),
vertex_validator_(&vertex_validator) {}
void LabelIndex::RunGC() {
for (auto &index_entry : index_) {
index_entry.second.run_gc();
}
}
bool LabelPropertyIndex::Entry::operator<(const Entry &rhs) const {
if (value < rhs.value) {
return true;
@ -709,13 +703,6 @@ int64_t LabelPropertyIndex::VertexCount(LabelId label, PropertyId property,
return static_cast<int64_t>(std::distance(lower_it, upper_it));
}
void LabelPropertyIndex::RunGC() {
// TODO(jbajic) What to do?
// for (auto &index_entry : index_) {
// index_entry.second.run_gc();
// }
}
void RemoveObsoleteEntries(Indices *indices, const uint64_t clean_up_before_timestamp) {
indices->label_index.RemoveObsoleteEntries(clean_up_before_timestamp);
indices->label_property_index.RemoveObsoleteEntries(clean_up_before_timestamp);

View File

@ -123,8 +123,6 @@ class LabelIndex {
void Clear() { index_.clear(); }
void RunGC();
private:
std::map<LabelId, utils::SkipList<Entry>> index_;
Indices *indices_;
@ -240,8 +238,6 @@ class LabelPropertyIndex {
void Clear() { index_.clear(); }
void RunGC();
private:
std::map<std::pair<LabelId, PropertyId>, LabelPropertyIndexContainer> index_;
Indices *indices_;

View File

@ -46,7 +46,7 @@ struct VertexData {
Delta *delta;
};
// static_assert(alignof(Vertex) >= 8, "The Vertex should be aligned to at least 8!");
static_assert(alignof(VertexData) >= 8, "The Vertex should be aligned to at least 8!");
using VertexContainer = std::map<PrimaryKey, VertexData>;
using Vertex = VertexContainer::value_type;