-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ji Bin <[email protected]>
- Loading branch information
Showing
7 changed files
with
933 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
MILVUS_REPO="https://github.com/milvus-io/milvus.git" | ||
MILVUS_VERSION="v2.2.13" | ||
MILVUS_VERSION="v2.2.14" | ||
BUILD_PROXY= | ||
BUILD_FORCE=NO |
774 changes: 774 additions & 0 deletions
774
milvus_binary/patches/milvus-v2.2.14/0001-patch-for-milvus-lite.patch
Large diffs are not rendered by default.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
milvus_binary/patches/milvus-v2.2.14/0002-workaround-for-sys-mman.h-for-mignw.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 060a5eefb4d8afaa3e1e2a48116e861715e17c3c Mon Sep 17 00:00:00 2001 | ||
From: Ji Bin <[email protected]> | ||
Date: Thu, 8 Jun 2023 19:34:14 +0800 | ||
Subject: [PATCH 2/4] workaround for sys/mman.h for mignw | ||
|
||
Signed-off-by: Ji Bin <[email protected]> | ||
--- | ||
internal/core/src/common/Column.h | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/internal/core/src/common/Column.h b/internal/core/src/common/Column.h | ||
index 4a8f39457..b1d59635c 100644 | ||
--- a/internal/core/src/common/Column.h | ||
+++ b/internal/core/src/common/Column.h | ||
@@ -10,8 +10,12 @@ | ||
// or implied. See the License for the specific language governing permissions and limitations under the License | ||
|
||
#pragma once | ||
- | ||
+#ifndef __MINGW64__ | ||
#include <sys/mman.h> | ||
+#else | ||
+// mman for win32, we have it in annoy | ||
+#include <annoy/src/mman.h> | ||
+#endif | ||
|
||
#include <cstddef> | ||
#include <ostream> | ||
-- | ||
2.42.0 | ||
|
65 changes: 65 additions & 0 deletions
65
milvus_binary/patches/milvus-v2.2.14/0003-workaround-for-querynode-indexnode-folder.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
From 4f1beae860789b041489efeb5ead5045a098f40a Mon Sep 17 00:00:00 2001 | ||
From: Ji Bin <[email protected]> | ||
Date: Thu, 8 Jun 2023 19:01:18 +0800 | ||
Subject: [PATCH 3/4] workaround for querynode/indexnode folder | ||
|
||
Signed-off-by: Ji Bin <[email protected]> | ||
--- | ||
internal/core/src/storage/Util.cpp | 27 +++++++++++++++++++++++++++ | ||
1 file changed, 27 insertions(+) | ||
|
||
diff --git a/internal/core/src/storage/Util.cpp b/internal/core/src/storage/Util.cpp | ||
index 659307570..5d4335037 100644 | ||
--- a/internal/core/src/storage/Util.cpp | ||
+++ b/internal/core/src/storage/Util.cpp | ||
@@ -33,6 +33,29 @@ | ||
#include "storage/DiskFileManagerImpl.h" | ||
#endif | ||
|
||
+namespace { | ||
+std::string patch_index_files_path(const std::string& path) { | ||
+ auto file = path; | ||
+ auto index = file.find("querynode/index_files"); | ||
+ if (index != std::string::npos) { | ||
+ file.replace(index, strlen("querynode/index_files"), "index_files"); | ||
+ } | ||
+ index = file.find("querynode\\index_files"); | ||
+ if (index != std::string::npos) { | ||
+ file.replace(index, strlen("querynode\\index_files"), "index_files"); | ||
+ } | ||
+ index = file.find("indexnode/index_files"); | ||
+ if (index != std::string::npos) { | ||
+ file.replace(index, strlen("indexnode/index_files"), "index_files"); | ||
+ } | ||
+ index = file.find("indexnode\\index_files"); | ||
+ if (index != std::string::npos) { | ||
+ file.replace(index, strlen("indexnode\\index_files"), "index_files"); | ||
+ } | ||
+ return file; | ||
+} | ||
+} | ||
+ | ||
namespace milvus::storage { | ||
|
||
std::map<std::string, ChunkManagerType> ChunkManagerType_Map = {{"local", ChunkManagerType::Local}, | ||
@@ -360,6 +383,8 @@ DownloadAndDecodeRemoteFile(RemoteChunkManager* remote_chunk_manager, std::strin | ||
ChunkManager *chunk_manager = remote_chunk_manager; | ||
if (! chunk_manager) { | ||
chunk_manager = &LocalChunkManager::GetInstance(); | ||
+ // workaround: replace any /querynode/ /indexnode/ => / | ||
+ file = patch_index_files_path(file); | ||
} | ||
auto fileSize = chunk_manager->Size(file); | ||
auto buf = std::shared_ptr<uint8_t[]>(new uint8_t[fileSize]); | ||
@@ -386,6 +411,8 @@ EncodeAndUploadIndexSlice(RemoteChunkManager* remote_chunk_manager, | ||
ChunkManager *chunk_manager = remote_chunk_manager; | ||
if (! chunk_manager) { | ||
chunk_manager = &LocalChunkManager::GetInstance(); | ||
+ // workaround: replace any /querynode/ /indexnode/ => / | ||
+ object_key = patch_index_files_path(object_key); | ||
} | ||
chunk_manager->Write(object_key, serialized_index_data.data(), serialized_index_size); | ||
return std::pair<std::string, size_t>(object_key, serialized_index_size); | ||
-- | ||
2.42.0 | ||
|
49 changes: 49 additions & 0 deletions
49
milvus_binary/patches/milvus-v2.2.14/0004-patch-for-v2.2.10.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From 5dee8df08eadaeafaac2ad48ee0089cac1e7d4b4 Mon Sep 17 00:00:00 2001 | ||
From: Ji Bin <[email protected]> | ||
Date: Fri, 16 Jun 2023 11:06:10 +0800 | ||
Subject: [PATCH 4/4] patch for v2.2.10 | ||
|
||
Signed-off-by: Ji Bin <[email protected]> | ||
--- | ||
internal/core/src/storage/MinioChunkManager.cpp | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/internal/core/src/storage/MinioChunkManager.cpp b/internal/core/src/storage/MinioChunkManager.cpp | ||
index d60eb038c..f481c5a11 100644 | ||
--- a/internal/core/src/storage/MinioChunkManager.cpp | ||
+++ b/internal/core/src/storage/MinioChunkManager.cpp | ||
@@ -56,6 +56,7 @@ namespace milvus::storage { | ||
std::atomic<size_t> MinioChunkManager::init_count_(0); | ||
std::mutex MinioChunkManager::client_mutex_; | ||
|
||
+#ifndef WIN32 | ||
static void | ||
SwallowHandler(int signal) { | ||
#pragma GCC diagnostic push | ||
@@ -71,6 +72,7 @@ SwallowHandler(int signal) { | ||
} | ||
#pragma GCC diagnostic pop | ||
} | ||
+#endif | ||
|
||
/** | ||
* @brief convert std::string to Aws::String | ||
@@ -105,6 +107,7 @@ MinioChunkManager::InitSDKAPI(RemoteStorageType type, bool useIAM, const std::st | ||
std::scoped_lock lock{client_mutex_}; | ||
const size_t initCount = init_count_++; | ||
if (initCount == 0) { | ||
+#ifndef WIN32 | ||
// sdk_options_.httpOptions.installSigPipeHandler = true; | ||
struct sigaction psa; | ||
memset(&psa, 0, sizeof psa); | ||
@@ -114,6 +117,7 @@ MinioChunkManager::InitSDKAPI(RemoteStorageType type, bool useIAM, const std::st | ||
sigemptyset(&psa.sa_mask); | ||
sigaddset(&psa.sa_mask, SIGPIPE); | ||
sigaction(SIGPIPE, &psa, 0); | ||
+#endif | ||
#ifdef BUILD_GCP | ||
if (type == RemoteStorageType::GOOGLE_CLOUD && useIAM) { | ||
sdk_options_.httpOptions.httpClientFactory_create_fn = []() { | ||
-- | ||
2.42.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
import urllib.request | ||
import hashlib | ||
|
||
__version__ = '2.2.13-3' | ||
__version__ = '2.2.14' | ||
|
||
LOGGERS = {} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters