Skip to content

Commit

Permalink
add a custom http header: Accept-Type-Allow-Int64
Browse files Browse the repository at this point in the history
Signed-off-by: PowderLi <[email protected]>
  • Loading branch information
PowderLi committed Oct 31, 2023
1 parent 9b6eeb4 commit 7e7e323
Show file tree
Hide file tree
Showing 9 changed files with 763 additions and 409 deletions.
6 changes: 3 additions & 3 deletions internal/core/src/storage/MinioChunkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ MinioChunkManager::Remove(const std::string& filepath) {

std::vector<std::string>
MinioChunkManager::ListWithPrefix(const std::string& filepath) {
return ListObjects(default_bucket_name_.c_str(), filepath.c_str());
return ListObjects(default_bucket_name_, filepath);

Check warning on line 350 in internal/core/src/storage/MinioChunkManager.cpp

View check run for this annotation

Codecov / codecov/patch

internal/core/src/storage/MinioChunkManager.cpp#L350

Added line #L350 was not covered by tests
}

uint64_t
Expand Down Expand Up @@ -393,7 +393,7 @@ MinioChunkManager::ListBuckets() {
ThrowS3Error("ListBuckets", err, "params");
}
for (auto&& b : outcome.GetResult().GetBuckets()) {
buckets.emplace_back(b.GetName().c_str());
buckets.emplace_back(b.GetName());

Check warning on line 396 in internal/core/src/storage/MinioChunkManager.cpp

View check run for this annotation

Codecov / codecov/patch

internal/core/src/storage/MinioChunkManager.cpp#L396

Added line #L396 was not covered by tests
}
return buckets;
}
Expand Down Expand Up @@ -623,7 +623,7 @@ MinioChunkManager::ListObjects(const std::string& bucket_name,
}
auto objects = outcome.GetResult().GetContents();
for (auto& obj : objects) {
objects_vec.emplace_back(obj.GetKey().c_str());
objects_vec.emplace_back(obj.GetKey());

Check warning on line 626 in internal/core/src/storage/MinioChunkManager.cpp

View check run for this annotation

Codecov / codecov/patch

internal/core/src/storage/MinioChunkManager.cpp#L626

Added line #L626 was not covered by tests
}
return objects_vec;
}
Expand Down
18 changes: 9 additions & 9 deletions internal/distributed/proxy/httpserver/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ const (
EnableAutoID = true
DisableAutoID = false

HTTPCollectionName = "collectionName"
HTTPDbName = "dbName"
DefaultDbName = "default"
DefaultIndexName = "vector_idx"
DefaultOutputFields = "*"

HTTPReturnCode = "code"
HTTPReturnMessage = "message"
HTTPReturnData = "data"
HTTPCollectionName = "collectionName"
HTTPDbName = "dbName"
DefaultDbName = "default"
DefaultIndexName = "vector_idx"
DefaultOutputFields = "*"
HTTPHeaderAllowInt64 = "Accept-Type-Allow-Int64"
HTTPReturnCode = "code"
HTTPReturnMessage = "message"
HTTPReturnData = "data"

HTTPReturnFieldName = "name"
HTTPReturnFieldType = "type"
Expand Down
187 changes: 146 additions & 41 deletions internal/distributed/proxy/httpserver/handler_v1.go

Large diffs are not rendered by default.

Loading

0 comments on commit 7e7e323

Please sign in to comment.