Compare commits

..

7 Commits

Author SHA1 Message Date
Marko Barišić
da9d6dd8e1 Prepare for 2.12.1 patch release (#1524)
* Update license date
* Add override version
2023-11-17 08:17:43 -05:00
Deda
a65a30cfc5 Merge master into release/2.12 2023-11-17 11:30:40 +01:00
Deda
b2de962a3f Add step to run.sh which deletes /memgraph from builder before copy 2023-10-31 19:22:52 +01:00
Deda
68e79bdaf4 Fix run.sh 2023-10-31 19:18:05 +01:00
Deda
7ee44ae484 Add git clean step to run.sh 2023-10-31 19:13:55 +01:00
Deda
0e0f8fe231 Revert timeout for arm builds back to 120 minutes 2023-10-31 18:13:10 +01:00
Deda
390fc98379 Fix timeout for arm package all builds and nodejs dependency issue for amazon linux 2 2023-10-31 13:04:37 +01:00
6 changed files with 9 additions and 17 deletions

View File

@@ -64,7 +64,7 @@ option(MG_ENTERPRISE "Build Memgraph Enterprise Edition" ON)
# Set the current version here to override the automatic version detection. The
# version must be specified as `X.Y.Z`. Primarily used when building new patch
# versions.
set(MEMGRAPH_OVERRIDE_VERSION "")
set(MEMGRAPH_OVERRIDE_VERSION "2.12.1")
# Custom suffix that this version should have. The suffix can be any arbitrary
# string. Primarily used when building a version for a specific customer.

View File

@@ -36,7 +36,7 @@ ADDITIONAL USE GRANT: You may use the Licensed Work in accordance with the
3. using the Licensed Work to create a work or solution
which competes (or might reasonably be expected to
compete) with the Licensed Work.
CHANGE DATE: 2027-30-10
CHANGE DATE: 2027-17-11
CHANGE LICENSE: Apache License, Version 2.0
For information about alternative licensing arrangements, please visit: https://memgraph.com/legal.

View File

@@ -75,7 +75,7 @@ std::vector<SnapshotDurabilityInfo> GetSnapshotFiles(const std::filesystem::path
const std::string_view uuid) {
std::vector<SnapshotDurabilityInfo> snapshot_files;
std::error_code error_code;
if (!utils::IsDirEmpty(snapshot_directory)) {
if (utils::DirExists(snapshot_directory)) {
for (const auto &item : std::filesystem::directory_iterator(snapshot_directory, error_code)) {
if (!item.is_regular_file()) continue;
if (!utils::HasReadAccess(item.path())) {
@@ -102,7 +102,7 @@ std::vector<SnapshotDurabilityInfo> GetSnapshotFiles(const std::filesystem::path
std::optional<std::vector<WalDurabilityInfo>> GetWalFiles(const std::filesystem::path &wal_directory,
const std::string_view uuid,
const std::optional<size_t> current_seq_num) {
if (utils::IsDirEmpty(wal_directory)) return std::nullopt;
if (!utils::DirExists(wal_directory)) return std::nullopt;
std::vector<WalDurabilityInfo> wal_files;
std::error_code error_code;
@@ -230,8 +230,8 @@ std::optional<RecoveryInfo> RecoverData(const std::filesystem::path &snapshot_di
utils::MemoryTracker::OutOfMemoryExceptionEnabler oom_exception;
spdlog::info("Recovering persisted data using snapshot ({}) and WAL directory ({}).", snapshot_directory,
wal_directory);
if (utils::IsDirEmpty(snapshot_directory) && utils::IsDirEmpty(wal_directory)) {
spdlog::warn(utils::MessageWithLink("Snapshot and WAL directory are both empty, there is nothing to recover.",
if (!utils::DirExists(snapshot_directory) && !utils::DirExists(wal_directory)) {
spdlog::warn(utils::MessageWithLink("Snapshot or WAL directory don't exist, there is nothing to recover.",
"https://memgr.ph/durability"));
return std::nullopt;
}
@@ -277,7 +277,7 @@ std::optional<RecoveryInfo> RecoverData(const std::filesystem::path &snapshot_di
snapshot_timestamp = recovered_snapshot->snapshot_info.start_timestamp;
repl_storage_state.epoch_.SetEpoch(std::move(recovered_snapshot->snapshot_info.epoch_id));
if (utils::IsDirEmpty(wal_directory)) {
if (!utils::DirExists(wal_directory)) {
const auto par_exec_info = config.durability.allow_parallel_index_creation
? std::make_optional(std::make_pair(recovery_info.vertex_batches,
config.durability.recovery_thread_count))
@@ -288,7 +288,7 @@ std::optional<RecoveryInfo> RecoverData(const std::filesystem::path &snapshot_di
} else {
spdlog::info("No snapshot file was found, collecting information from WAL directory {}.", wal_directory);
std::error_code error_code;
if (utils::IsDirEmpty(wal_directory)) return std::nullopt;
if (!utils::DirExists(wal_directory)) return std::nullopt;
// We use this smaller struct that contains only a subset of information
// necessary for the rest of the recovery function.
// Also, the struct is sorted primarily on the path it contains.

View File

@@ -66,11 +66,6 @@ bool DeleteDir(const std::filesystem::path &dir) noexcept {
return std::filesystem::remove_all(dir, error_code) > 0;
}
bool IsDirEmpty(const std::filesystem::path &dir) noexcept {
std::filesystem::directory_iterator it(dir);
return it == std::filesystem::directory_iterator();
}
bool DeleteFile(const std::filesystem::path &file) noexcept {
std::error_code error_code; // For exception suppression.
return std::filesystem::remove(file, error_code);

View File

@@ -53,9 +53,6 @@ bool DirExists(const std::filesystem::path &dir);
/// Deletes everything from the given directory including the directory.
bool DeleteDir(const std::filesystem::path &dir) noexcept;
/// Checks if a given directory contains any files.
bool IsDirEmpty(const std::filesystem::path &dir) noexcept;
/// Deletes just the specified file. Symlinks are not followed.
bool DeleteFile(const std::filesystem::path &file) noexcept;

View File

@@ -49,7 +49,7 @@ def test_gc_periodic(connection):
memory_pre_creation = get_memory(cursor)
execute_and_fetch_all(cursor, "UNWIND range(1, 1000) AS index CREATE (:Node);")
memory_after_creation = get_memory(cursor)
time.sleep(5)
time.sleep(2)
memory_after_gc = get_memory(cursor)
assert memory_after_gc < memory_pre_creation + (memory_after_creation - memory_pre_creation) / 4 * 3