Skip to content

Commit

Permalink
Fixing iteration related issue in scan command
Browse files Browse the repository at this point in the history
  • Loading branch information
pratheep-kumar committed Oct 8, 2024
1 parent 3742078 commit 4e715cb
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1375,15 +1375,16 @@ SplitRequestPtr ScanRequest::create(Router& router, Common::Redis::RespValuePtr&
addBulkString(requestArray, request_ptr->resp_obj_count_);
}

std::string request_str;
for (const auto& element : requestArray.asArray()) {
if (element.type() == Common::Redis::RespType::BulkString) {
request_str += element.asString() + " ";
}
}

// Log the constructed request array
ENVOY_LOG(debug, "Constructed SCAN request: {}", request_str);
// Un comment this to log the constructed request array
// std::string request_str;
// for (const auto& element : requestArray.asArray()) {
// if (element.type() == Common::Redis::RespType::BulkString) {
// request_str += element.asString() + " ";
// }
// }

// // Log the constructed request array
// ENVOY_LOG(debug, "Constructed SCAN request: {}", request_str);

// caching the request and route for making child request from response
request_ptr->request_ = requestArray;
Expand Down

0 comments on commit 4e715cb

Please sign in to comment.