Add part of dummy fixes

This commit is contained in:
Marko Budiselic 2022-09-18 09:05:29 +02:00
parent 898c894a48
commit 0b716f2a8f
27 changed files with 82 additions and 28 deletions

View File

@ -26,14 +26,14 @@ endif(CCACHE_FOUND AND USE_CCACHE)
# choose a compiler # choose a compiler
# NOTE: must be choosen before use of project() or enable_language() # NOTE: must be choosen before use of project() or enable_language()
find_program(CLANG_FOUND clang) # find_program(CLANG_FOUND clang)
find_program(CLANGXX_FOUND clang++) # find_program(CLANGXX_FOUND clang++)
if (CLANG_FOUND AND CLANGXX_FOUND) # if (CLANG_FOUND AND CLANGXX_FOUND)
set(CMAKE_C_COMPILER ${CLANG_FOUND}) # set(CMAKE_C_COMPILER ${CLANG_FOUND})
set(CMAKE_CXX_COMPILER ${CLANGXX_FOUND}) # set(CMAKE_CXX_COMPILER ${CLANGXX_FOUND})
else() # else()
message(FATAL_ERROR "Couldn't find clang and/or clang++!") # message(FATAL_ERROR "Couldn't find clang and/or clang++!")
endif() # endif()
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@ -181,9 +181,15 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
# c99-designator is disabled because of required mixture of designated and # c99-designator is disabled because of required mixture of designated and
# non-designated initializers in Python Query Module code (`py_module.cpp`). # non-designated initializers in Python Query Module code (`py_module.cpp`).
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall \
# -Werror=switch -Werror=switch-bool -Werror=return-type \
# -Werror=return-stack-address \
# -Wno-c99-designator \
# -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall \ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall \
-Werror=switch -Werror=switch-bool -Werror=return-type \ -Werror=switch -Werror=switch-bool -Werror=return-type \
-Werror=return-stack-address \ -Werror=return-local-addr \
-Wno-c99-designator \ -Wno-c99-designator \
-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT") -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT")

View File

@ -79,6 +79,7 @@ inline nlohmann::json PropertyValueToJson(const storage::PropertyValue &pv) {
return ss.str(); return ss.str();
} }
} }
throw 1;
}; };
ret = to_string(temporal_data); ret = to_string(temporal_data);
break; break;

View File

@ -88,6 +88,7 @@ std::string PermissionToString(Permission permission) {
case Permission::WEBSOCKET: case Permission::WEBSOCKET:
return "WEBSOCKET"; return "WEBSOCKET";
} }
return "";
} }
std::string PermissionLevelToString(PermissionLevel level) { std::string PermissionLevelToString(PermissionLevel level) {
@ -99,6 +100,7 @@ std::string PermissionLevelToString(PermissionLevel level) {
case PermissionLevel::DENY: case PermissionLevel::DENY:
return "DENY"; return "DENY";
} }
return "";
} }
#ifdef MG_ENTERPRISE #ifdef MG_ENTERPRISE
@ -129,6 +131,7 @@ std::string FineGrainedPermissionToString(const FineGrainedPermission level) {
case FineGrainedPermission::NOTHING: case FineGrainedPermission::NOTHING:
return "NOTHING"; return "NOTHING";
} }
return "";
} }
FineGrainedAccessPermissions Merge(const FineGrainedAccessPermissions &first, FineGrainedAccessPermissions Merge(const FineGrainedAccessPermissions &first,

View File

@ -122,7 +122,7 @@ class Client final {
const std::optional<std::string> &db); const std::optional<std::string> &db);
private: private:
using ClientEncoder = ClientEncoder<ChunkedEncoderBuffer<communication::ClientOutputStream>>; using ClientEncoderX = ClientEncoder<ChunkedEncoderBuffer<communication::ClientOutputStream>>;
template <typename TException = FailureResponseException> template <typename TException = FailureResponseException>
[[noreturn]] void HandleFailure(const std::map<std::string, Value> &response_map) { [[noreturn]] void HandleFailure(const std::map<std::string, Value> &response_map) {
@ -153,6 +153,6 @@ class Client final {
// encoder objects // encoder objects
ChunkedEncoderBuffer<communication::ClientOutputStream> encoder_buffer_{output_stream_}; ChunkedEncoderBuffer<communication::ClientOutputStream> encoder_buffer_{output_stream_};
ClientEncoder encoder_{encoder_buffer_}; ClientEncoderX encoder_{encoder_buffer_};
}; };
} // namespace memgraph::communication::bolt } // namespace memgraph::communication::bolt

View File

@ -425,6 +425,7 @@ std::ostream &operator<<(std::ostream &os, const Value &value) {
case Value::Type::Duration: case Value::Type::Duration:
return os << value.ValueDuration(); return os << value.ValueDuration();
} }
return os;
} }
std::ostream &operator<<(std::ostream &os, const Value::Type type) { std::ostream &operator<<(std::ostream &os, const Value::Type type) {
@ -460,5 +461,6 @@ std::ostream &operator<<(std::ostream &os, const Value::Type type) {
case Value::Type::Duration: case Value::Type::Duration:
return os << "duration"; return os << "duration";
} }
return os;
} }
} // namespace memgraph::communication::bolt } // namespace memgraph::communication::bolt

View File

@ -207,8 +207,9 @@ class Listener final {
CloseSession(session); CloseSession(session);
} else { } else {
// Unhandled epoll event. // Unhandled epoll event.
spdlog::error("Unhandled event occured in {} session associated with {} events: {}", service_name_, // TODO: GCC can't compile
session.socket().endpoint(), event.events); // spdlog::error("Unhandled event occured in {} session associated with {} events: {}", service_name_,
// session.socket().endpoint(), event.events);
CloseSession(session); CloseSession(session);
} }
} }

View File

@ -65,8 +65,10 @@ Listener::Listener(boost::asio::io_context &ioc, ServerContext *context, tcp::en
} }
void Listener::DoAccept() { void Listener::DoAccept() {
acceptor_.async_accept( // TODO(gitbuda): GCC throws and error here can't convert context to executor
ioc_, [shared_this = shared_from_this()](auto ec, auto socket) { shared_this->OnAccept(ec, std::move(socket)); }); // acceptor_.async_accept(
// ioc_, [shared_this = shared_from_this()](auto ec, auto socket) { shared_this->OnAccept(ec, std::move(socket));
// });
} }
void Listener::OnAccept(boost::beast::error_code ec, tcp::socket socket) { void Listener::OnAccept(boost::beast::error_code ec, tcp::socket socket) {

View File

@ -66,6 +66,7 @@ bool TypedValueCompare(const TypedValue &a, const TypedValue &b) {
case TypedValue::Type::Null: case TypedValue::Type::Null:
LOG_FATAL("Invalid type"); LOG_FATAL("Invalid type");
} }
throw 1;
} }
} // namespace impl } // namespace impl

View File

@ -85,9 +85,9 @@ class EdgeAccessor final {
bool IsCycle() const; bool IsCycle() const;
int64_t CypherId() const { return impl_.Gid().AsInt(); } int64_t CypherId() const { return impl_.GidX().AsInt(); }
storage::Gid Gid() const noexcept { return impl_.Gid(); } storage::Gid Gid() const noexcept { return impl_.GidX(); }
bool operator==(const EdgeAccessor &e) const noexcept { return impl_ == e.impl_; } bool operator==(const EdgeAccessor &e) const noexcept { return impl_ == e.impl_; }
@ -170,9 +170,9 @@ class VertexAccessor final {
storage::Result<size_t> OutDegree(storage::View view) const { return impl_.OutDegree(view); } storage::Result<size_t> OutDegree(storage::View view) const { return impl_.OutDegree(view); }
int64_t CypherId() const { return impl_.Gid().AsInt(); } int64_t CypherId() const { return impl_.GidX().AsInt(); }
storage::Gid Gid() const noexcept { return impl_.Gid(); } storage::Gid Gid() const noexcept { return impl_.GidX(); }
bool operator==(const VertexAccessor &v) const noexcept { bool operator==(const VertexAccessor &v) const noexcept {
static_assert(noexcept(impl_ == v.impl_)); static_assert(noexcept(impl_ == v.impl_));

View File

@ -1438,6 +1438,7 @@ cpp<#
case Type::SINGLE: case Type::SINGLE:
return false; return false;
} }
throw 1;
} }
cpp<#) cpp<#)
(:protected (:protected

View File

@ -539,6 +539,7 @@ std::string_view ToString(const CommonStreamConfigKey key) {
case CommonStreamConfigKey::END: case CommonStreamConfigKey::END:
LOG_FATAL("Invalid config key used"); LOG_FATAL("Invalid config key used");
} }
throw 1;
} }
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage) // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
@ -563,6 +564,7 @@ std::string_view ToString(const KafkaConfigKey key) {
case KafkaConfigKey::CREDENTIALS: case KafkaConfigKey::CREDENTIALS:
return "CREDENTIALS"; return "CREDENTIALS";
} }
throw 1;
} }
void MapCommonStreamConfigs(auto &memory, StreamQuery &stream_query) { void MapCommonStreamConfigs(auto &memory, StreamQuery &stream_query) {
@ -689,6 +691,7 @@ std::string_view ToString(const PulsarConfigKey key) {
case PulsarConfigKey::SERVICE_URL: case PulsarConfigKey::SERVICE_URL:
return "SERVICE_URL"; return "SERVICE_URL";
} }
throw 1;
} }
} // namespace } // namespace

View File

@ -590,6 +590,7 @@ TypedValue ValueType(const TypedValue *args, int64_t nargs, const FunctionContex
case TypedValue::Type::Graph: case TypedValue::Type::Graph:
throw QueryRuntimeException("Cannot fetch graph as it is not standardized openCypher type name"); throw QueryRuntimeException("Cannot fetch graph as it is not standardized openCypher type name");
} }
throw 1;
} }
// TODO: How is Keys different from Properties function? // TODO: How is Keys different from Properties function?

View File

@ -377,6 +377,7 @@ bool CreateExpand::CreateExpandCursor::Pull(Frame &frame, ExecutionContext &cont
case EdgeAtom::Direction::BOTH: case EdgeAtom::Direction::BOTH:
return CreateEdge(self_.edge_info_, dba, &v1, &v2, &frame, &evaluator); return CreateEdge(self_.edge_info_, dba, &v1, &v2, &frame, &evaluator);
} }
throw 1;
}(); }();
context.execution_stats[ExecutionStats::Key::CREATED_EDGES] += 1; context.execution_stats[ExecutionStats::Key::CREATED_EDGES] += 1;
@ -723,6 +724,7 @@ bool Expand::ExpandCursor::Pull(Frame &frame, ExecutionContext &context) {
case EdgeAtom::Direction::BOTH: case EdgeAtom::Direction::BOTH:
LOG_FATAL("Must indicate exact expansion direction here"); LOG_FATAL("Must indicate exact expansion direction here");
} }
throw 1;
}; };
while (true) { while (true) {
@ -2152,6 +2154,7 @@ UniqueCursorPtr ExpandVariable::MakeCursor(utils::MemoryResource *mem) const {
case EdgeAtom::Type::SINGLE: case EdgeAtom::Type::SINGLE:
LOG_FATAL("ExpandVariable should not be planned for a single expansion!"); LOG_FATAL("ExpandVariable should not be planned for a single expansion!");
} }
throw 1;
} }
class ConstructNamedPathCursor : public Cursor { class ConstructNamedPathCursor : public Cursor {

View File

@ -147,7 +147,9 @@ class ModuleRegistry final {
void *handle_; void *handle_;
}; };
#if __has_feature(address_sanitizer) // TODO: Figure out for both clang and GCC
// #if __has_feature(address_sanitizer)
#if defined(__SANITIZE_ADDRESS__)
// This is why we need RTLD_NODELETE and we must not use RTLD_DEEPBIND with // This is why we need RTLD_NODELETE and we must not use RTLD_DEEPBIND with
// ASAN: https://github.com/google/sanitizers/issues/89 // ASAN: https://github.com/google/sanitizers/issues/89
SharedLibraryHandle libstd_handle{"libstdc++.so.6", RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE}; SharedLibraryHandle libstd_handle{"libstdc++.so.6", RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE};

View File

@ -116,6 +116,7 @@ inline bool operator==(const PreviousPtr::Pointer &a, const PreviousPtr::Pointer
case PreviousPtr::Type::NULLPTR: case PreviousPtr::Type::NULLPTR:
return b.type == PreviousPtr::Type::NULLPTR; return b.type == PreviousPtr::Type::NULLPTR;
} }
throw 1;
} }
inline bool operator!=(const PreviousPtr::Pointer &a, const PreviousPtr::Pointer &b) { return !(a == b); } inline bool operator!=(const PreviousPtr::Pointer &a, const PreviousPtr::Pointer &b) { return !(a == b); }

View File

@ -354,6 +354,7 @@ std::optional<PropertyValue> Decoder::ReadPropertyValue() {
case Marker::VALUE_TRUE: case Marker::VALUE_TRUE:
return std::nullopt; return std::nullopt;
} }
return std::nullopt;
} }
bool Decoder::SkipString() { bool Decoder::SkipString() {
@ -453,6 +454,7 @@ bool Decoder::SkipPropertyValue() {
case Marker::VALUE_TRUE: case Marker::VALUE_TRUE:
return false; return false;
} }
return false;
} }
std::optional<uint64_t> Decoder::GetSize() { return file_.GetSize(); } std::optional<uint64_t> Decoder::GetSize() { return file_.GetSize(); }

View File

@ -775,15 +775,15 @@ void CreateSnapshot(Transaction *transaction, const std::filesystem::path &snaps
const auto &in_edges = maybe_in_edges.GetValue(); const auto &in_edges = maybe_in_edges.GetValue();
snapshot.WriteUint(in_edges.size()); snapshot.WriteUint(in_edges.size());
for (const auto &item : in_edges) { for (const auto &item : in_edges) {
snapshot.WriteUint(item.Gid().AsUint()); snapshot.WriteUint(item.GidX().AsUint());
snapshot.WriteUint(item.FromVertex().Gid().AsUint()); snapshot.WriteUint(item.FromVertex().GidX().AsUint());
write_mapping(item.EdgeType()); write_mapping(item.EdgeType());
} }
const auto &out_edges = maybe_out_edges.GetValue(); const auto &out_edges = maybe_out_edges.GetValue();
snapshot.WriteUint(out_edges.size()); snapshot.WriteUint(out_edges.size());
for (const auto &item : out_edges) { for (const auto &item : out_edges) {
snapshot.WriteUint(item.Gid().AsUint()); snapshot.WriteUint(item.GidX().AsUint());
snapshot.WriteUint(item.ToVertex().Gid().AsUint()); snapshot.WriteUint(item.ToVertex().GidX().AsUint());
write_mapping(item.EdgeType()); write_mapping(item.EdgeType());
} }
} }

View File

@ -94,6 +94,7 @@ Marker OperationToMarker(StorageGlobalOperation operation) {
case StorageGlobalOperation::UNIQUE_CONSTRAINT_DROP: case StorageGlobalOperation::UNIQUE_CONSTRAINT_DROP:
return Marker::DELTA_UNIQUE_CONSTRAINT_DROP; return Marker::DELTA_UNIQUE_CONSTRAINT_DROP;
} }
throw 1;
} }
Marker VertexActionToMarker(Delta::Action action) { Marker VertexActionToMarker(Delta::Action action) {
@ -120,6 +121,7 @@ Marker VertexActionToMarker(Delta::Action action) {
case Delta::Action::REMOVE_OUT_EDGE: case Delta::Action::REMOVE_OUT_EDGE:
return Marker::DELTA_EDGE_CREATE; return Marker::DELTA_EDGE_CREATE;
} }
throw 1;
} }
// This function convertes a Marker to a WalDeltaData::Type. It checks for the // This function convertes a Marker to a WalDeltaData::Type. It checks for the
@ -184,6 +186,7 @@ WalDeltaData::Type MarkerToWalDeltaDataType(Marker marker) {
case Marker::VALUE_TRUE: case Marker::VALUE_TRUE:
throw RecoveryFailure("Invalid WAL data!"); throw RecoveryFailure("Invalid WAL data!");
} }
throw 1;
} }
// Function used to either read or skip the current WAL delta data. The WAL // Function used to either read or skip the current WAL delta data. The WAL
@ -457,6 +460,7 @@ bool operator==(const WalDeltaData &a, const WalDeltaData &b) {
return a.operation_label_properties.label == b.operation_label_properties.label && return a.operation_label_properties.label == b.operation_label_properties.label &&
a.operation_label_properties.properties == b.operation_label_properties.properties; a.operation_label_properties.properties == b.operation_label_properties.properties;
} }
return false;
} }
bool operator!=(const WalDeltaData &a, const WalDeltaData &b) { return !(a == b); } bool operator!=(const WalDeltaData &a, const WalDeltaData &b) { return !(a == b); }

View File

@ -150,6 +150,7 @@ constexpr bool IsWalDeltaDataTypeTransactionEnd(const WalDeltaData::Type type) {
case WalDeltaData::Type::UNIQUE_CONSTRAINT_DROP: case WalDeltaData::Type::UNIQUE_CONSTRAINT_DROP:
return true; return true;
} }
return false;
} }
/// Function used to read information about the WAL file. /// Function used to read information about the WAL file.

View File

@ -68,7 +68,7 @@ class EdgeAccessor final {
/// @throw std::bad_alloc /// @throw std::bad_alloc
Result<std::map<PropertyId, PropertyValue>> Properties(View view) const; Result<std::map<PropertyId, PropertyValue>> Properties(View view) const;
Gid Gid() const noexcept { Gid GidX() const noexcept {
if (config_.properties_on_edges) { if (config_.properties_on_edges) {
return edge_.ptr->gid; return edge_.ptr->gid;
} else { } else {
@ -107,6 +107,6 @@ class EdgeAccessor final {
namespace std { namespace std {
template <> template <>
struct hash<memgraph::storage::EdgeAccessor> { struct hash<memgraph::storage::EdgeAccessor> {
size_t operator()(const memgraph::storage::EdgeAccessor &e) const { return e.Gid().AsUint(); } size_t operator()(const memgraph::storage::EdgeAccessor &e) const { return e.GidX().AsUint(); }
}; };
} // namespace std } // namespace std

View File

@ -467,6 +467,7 @@ std::optional<std::pair<Type, Size>> EncodePropertyValue(Writer *writer, const P
return {{Type::TEMPORAL_DATA, Size::INT8}}; return {{Type::TEMPORAL_DATA, Size::INT8}};
} }
} }
return std::nullopt;
} }
namespace { namespace {
@ -604,6 +605,7 @@ std::optional<TemporalData> DecodeTemporalData(Reader &reader) {
return true; return true;
} }
} }
return false;
} }
// Function used to compare a PropertyValue to the one stored in the byte // Function used to compare a PropertyValue to the one stored in the byte
@ -704,6 +706,7 @@ std::optional<TemporalData> DecodeTemporalData(Reader &reader) {
return *maybe_temporal_data == value.ValueTemporalData(); return *maybe_temporal_data == value.ValueTemporalData();
} }
} }
return false;
} }
// Function used to encode a property (PropertyId, PropertyValue) into a byte // Function used to encode a property (PropertyId, PropertyValue) into a byte

View File

@ -265,6 +265,7 @@ inline std::ostream &operator<<(std::ostream &os, const PropertyValue &value) {
return os << fmt::format("type: {}, microseconds: {}", TemporalTypeTostring(value.ValueTemporalData().type), return os << fmt::format("type: {}, microseconds: {}", TemporalTypeTostring(value.ValueTemporalData().type),
value.ValueTemporalData().microseconds); value.ValueTemporalData().microseconds);
} }
return os;
} }
// NOTE: The logic in this function *MUST* be equal to the logic in // NOTE: The logic in this function *MUST* be equal to the logic in
@ -298,6 +299,7 @@ inline bool operator==(const PropertyValue &first, const PropertyValue &second)
case PropertyValue::Type::TemporalData: case PropertyValue::Type::TemporalData:
return first.ValueTemporalData() == second.ValueTemporalData(); return first.ValueTemporalData() == second.ValueTemporalData();
} }
return false;
} }
inline bool operator<(const PropertyValue &first, const PropertyValue &second) noexcept { inline bool operator<(const PropertyValue &first, const PropertyValue &second) noexcept {
@ -328,6 +330,7 @@ inline bool operator<(const PropertyValue &first, const PropertyValue &second) n
case PropertyValue::Type::TemporalData: case PropertyValue::Type::TemporalData:
return first.ValueTemporalData() < second.ValueTemporalData(); return first.ValueTemporalData() < second.ValueTemporalData();
} }
return false;
} }
inline PropertyValue::PropertyValue(const PropertyValue &other) : type_(other.type_) { inline PropertyValue::PropertyValue(const PropertyValue &other) : type_(other.type_) {

View File

@ -66,6 +66,7 @@ std::string RegisterReplicaErrorToString(Storage::RegisterReplicaError error) {
case Storage::RegisterReplicaError::COULD_NOT_BE_PERSISTED: case Storage::RegisterReplicaError::COULD_NOT_BE_PERSISTED:
return "COULD_NOT_BE_PERSISTED"; return "COULD_NOT_BE_PERSISTED";
} }
throw 1;
} }
} // namespace } // namespace
@ -173,6 +174,7 @@ VerticesIterable::Iterator VerticesIterable::begin() {
case Type::BY_LABEL_PROPERTY: case Type::BY_LABEL_PROPERTY:
return Iterator(vertices_by_label_property_.begin()); return Iterator(vertices_by_label_property_.begin());
} }
throw 1;
} }
VerticesIterable::Iterator VerticesIterable::end() { VerticesIterable::Iterator VerticesIterable::end() {
@ -184,6 +186,7 @@ VerticesIterable::Iterator VerticesIterable::end() {
case Type::BY_LABEL_PROPERTY: case Type::BY_LABEL_PROPERTY:
return Iterator(vertices_by_label_property_.end()); return Iterator(vertices_by_label_property_.end());
} }
throw 1;
} }
VerticesIterable::Iterator::Iterator(AllVerticesIterable::Iterator it) : type_(Type::ALL) { VerticesIterable::Iterator::Iterator(AllVerticesIterable::Iterator it) : type_(Type::ALL) {
@ -285,6 +288,7 @@ VertexAccessor VerticesIterable::Iterator::operator*() const {
case Type::BY_LABEL_PROPERTY: case Type::BY_LABEL_PROPERTY:
return *by_label_property_it_; return *by_label_property_it_;
} }
throw 1;
} }
VerticesIterable::Iterator &VerticesIterable::Iterator::operator++() { VerticesIterable::Iterator &VerticesIterable::Iterator::operator++() {
@ -311,6 +315,7 @@ bool VerticesIterable::Iterator::operator==(const Iterator &other) const {
case Type::BY_LABEL_PROPERTY: case Type::BY_LABEL_PROPERTY:
return by_label_property_it_ == other.by_label_property_it_; return by_label_property_it_ == other.by_label_property_it_;
} }
throw 1;
} }
Storage::Storage(Config config) Storage::Storage(Config config)
@ -1760,6 +1765,7 @@ bool Storage::AppendToWalDataManipulation(const Transaction &transaction, uint64
case Delta::Action::REMOVE_OUT_EDGE: case Delta::Action::REMOVE_OUT_EDGE:
return false; return false;
} }
throw 1;
}); });
} }
// 2. Process all Vertex deltas and store all operations that create edges. // 2. Process all Vertex deltas and store all operations that create edges.
@ -1782,6 +1788,7 @@ bool Storage::AppendToWalDataManipulation(const Transaction &transaction, uint64
case Delta::Action::REMOVE_IN_EDGE: case Delta::Action::REMOVE_IN_EDGE:
return false; return false;
} }
throw 1;
}); });
} }
// 3. Process all Edge deltas and store all operations that modify edge data. // 3. Process all Edge deltas and store all operations that modify edge data.
@ -1804,6 +1811,7 @@ bool Storage::AppendToWalDataManipulation(const Transaction &transaction, uint64
case Delta::Action::REMOVE_OUT_EDGE: case Delta::Action::REMOVE_OUT_EDGE:
return false; return false;
} }
throw 1;
}); });
} }
// 4. Process all Vertex deltas and store all operations that delete edges. // 4. Process all Vertex deltas and store all operations that delete edges.
@ -1826,6 +1834,7 @@ bool Storage::AppendToWalDataManipulation(const Transaction &transaction, uint64
case Delta::Action::REMOVE_OUT_EDGE: case Delta::Action::REMOVE_OUT_EDGE:
return false; return false;
} }
throw 1;
}); });
} }
// 5. Process all Vertex deltas and store all operations that delete vertices. // 5. Process all Vertex deltas and store all operations that delete vertices.
@ -1848,6 +1857,7 @@ bool Storage::AppendToWalDataManipulation(const Transaction &transaction, uint64
case Delta::Action::REMOVE_OUT_EDGE: case Delta::Action::REMOVE_OUT_EDGE:
return false; return false;
} }
throw 1;
}); });
} }

View File

@ -31,6 +31,7 @@ constexpr std::string_view TemporalTypeTostring(const TemporalType type) {
case TemporalType::Duration: case TemporalType::Duration:
return "Duration"; return "Duration";
} }
return "";
} }
struct TemporalData { struct TemporalData {
@ -48,6 +49,7 @@ struct TemporalData {
case TemporalType::Duration: case TemporalType::Duration:
return os << "DURATION(\"" << utils::Duration(t.microseconds) << "\")"; return os << "DURATION(\"" << utils::Duration(t.microseconds) << "\")";
} }
throw 1;
} }
TemporalType type; TemporalType type;
int64_t microseconds; int64_t microseconds;

View File

@ -94,7 +94,7 @@ class VertexAccessor final {
Result<size_t> OutDegree(View view) const; Result<size_t> OutDegree(View view) const;
Gid Gid() const noexcept { return vertex_->gid; } Gid GidX() const noexcept { return vertex_->gid; }
bool operator==(const VertexAccessor &other) const noexcept { bool operator==(const VertexAccessor &other) const noexcept {
return vertex_ == other.vertex_ && transaction_ == other.transaction_; return vertex_ == other.vertex_ && transaction_ == other.transaction_;
@ -123,6 +123,6 @@ class VertexAccessor final {
namespace std { namespace std {
template <> template <>
struct hash<memgraph::storage::VertexAccessor> { struct hash<memgraph::storage::VertexAccessor> {
size_t operator()(const memgraph::storage::VertexAccessor &v) const noexcept { return v.Gid().AsUint(); } size_t operator()(const memgraph::storage::VertexAccessor &v) const noexcept { return v.GidX().AsUint(); }
}; };
} // namespace std } // namespace std

View File

@ -217,6 +217,7 @@ std::string LicenseCheckErrorToString(LicenseCheckError error, const std::string
"SET DATABASE SETTING \"enterprise.license\" TO \"your-license-key\"", "SET DATABASE SETTING \"enterprise.license\" TO \"your-license-key\"",
feature); feature);
} }
return "";
} }
LicenseCheckResult LicenseChecker::IsValidLicense(const utils::Settings &settings) const { LicenseCheckResult LicenseChecker::IsValidLicense(const utils::Settings &settings) const {

View File

@ -74,6 +74,7 @@ class Synchronized {
template <class... Args> template <class... Args>
explicit Synchronized(Args &&...args) : object_(std::forward<Args>(args)...) {} explicit Synchronized(Args &&...args) : object_(std::forward<Args>(args)...) {}
Synchronized() = default;
Synchronized(const Synchronized &) = delete; Synchronized(const Synchronized &) = delete;
Synchronized(Synchronized &&) = delete; Synchronized(Synchronized &&) = delete;
Synchronized &operator=(const Synchronized &) = delete; Synchronized &operator=(const Synchronized &) = delete;