Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class HomeObjectConan(ConanFile):
name = "homeobject"
version = "4.1.16"
version = "4.1.17"

homepage = "https://github.com/eBay/HomeObject"
description = "Blob Store built on HomeStore"
Expand Down
14 changes: 14 additions & 0 deletions src/lib/homestore_backend/hs_http_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ void HttpManager::get_shard(const Pistache::Rest::Request& request, Pistache::Ht
j["v_chunk_id"] = chk.value();
j["p_chunk_id"] = pchk.value();
pg_id_t pg_id = ho_.get_pg_id_from_shard_id(shard_id);
if (auto vchunk = ho_.chunk_selector()->get_pg_vchunk(pg_id, chk.value()); vchunk) {
j["v_chunk_state"] = enum_name(vchunk->m_state);
}
Comment thread
Besroy marked this conversation as resolved.
auto hs_pg = ho_.get_hs_pg(pg_id);
if (!hs_pg) {
response.send(Pistache::Http::Code::Internal_Server_Error, "pg not found");
Expand Down Expand Up @@ -253,6 +256,11 @@ void HttpManager::dump_chunk(const Pistache::Rest::Request& request, Pistache::H
uint16_t v_chunk_id = std::stoul(chunk_str.value());
nlohmann::json j;
j["v_chunk_id"] = v_chunk_id;

if (auto vchunk = ho_.chunk_selector()->get_pg_vchunk(pg_id, v_chunk_id); vchunk) {
j["v_chunk_state"] = enum_name(vchunk->m_state);
}
Comment thread
Besroy marked this conversation as resolved.

auto shards = hs_pg->get_chunk_shards(v_chunk_id);
for (auto const& s : shards) {
nlohmann::json shard_json;
Expand Down Expand Up @@ -281,6 +289,12 @@ void HttpManager::dump_shard(const Pistache::Rest::Request& request, Pistache::H
return;
}
j["v_chunk_id"] = chk.value();

pg_id_t pg_id = ho_.get_pg_id_from_shard_id(shard_id);
if (auto vchunk = ho_.chunk_selector()->get_pg_vchunk(pg_id, chk.value()); vchunk) {
j["v_chunk_state"] = enum_name(vchunk->m_state);
}
Comment thread
Besroy marked this conversation as resolved.

auto r = ho_.get_shard_blobs(shard_id);
if (!r) {
response.send(Pistache::Http::Code::Internal_Server_Error, "failed to get shard blobs");
Expand Down
Loading