Skip to content

Commit

Permalink
Merge 6ebba6b into c981906
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHogan committed Apr 15, 2021
2 parents c981906 + 6ebba6b commit ea0fa78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/metadata_management.cc
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,8 @@ void AttachBlobToBucket(SharedMemoryContext *context, RpcContext *rpc,
bool is_swap_blob) {
MetadataManager *mdm = GetMetadataManagerFromContext(context);

int target_node = HashString(mdm, rpc, blob_name);
std::string internal_name = MakeInternalBlobName(blob_name, bucket_id);
int target_node = HashString(mdm, rpc, internal_name.c_str());
BlobID blob_id = {};
// NOTE(chogan): A negative node_id indicates a swap blob
blob_id.bits.node_id = is_swap_blob ? -target_node : target_node;
Expand Down
2 changes: 1 addition & 1 deletion src/metadata_storage_stb_ds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ u64 GetFromStorage(MetadataManager *mdm, const char *key, MapType map_type) {
std::string ReverseGetFromStorage(MetadataManager *mdm, u64 id,
MapType map_type) {
std::string result;
size_t map_size = GetStoredMapSize(mdm, map_type);
IdMap *map = GetMap(mdm, map_type);
size_t map_size = shlen(map);

// TODO(chogan): @optimization This could be more efficient if necessary
for (size_t i = 0; i < map_size; ++i) {
Expand Down

0 comments on commit ea0fa78

Please sign in to comment.