From 885a08291158ae60ca15b5cd26b946209c720cdf Mon Sep 17 00:00:00 2001 From: sunby Date: Mon, 6 Nov 2023 17:34:48 +0800 Subject: [PATCH] [Cpp] Update manfiest version after write blobs Signed-off-by: sunby --- cpp/src/storage/space.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/storage/space.cpp b/cpp/src/storage/space.cpp index 25bf4fc7..82f7ad5d 100644 --- a/cpp/src/storage/space.cpp +++ b/cpp/src/storage/space.cpp @@ -190,6 +190,7 @@ Status Space::WriteBolb(std::string name, void* blob, int64_t length, bool repla std::lock_guard lock(mutex_); auto next_version = next_manifest_version_++; auto copied = new Manifest(*manifest_); + copied->set_version(next_version); copied->remove_blob_if_exist(name); copied->add_blob({name, length, blob_file_path}); RETURN_NOT_OK(SafeSaveManifest(fs_, path_, copied));