Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
rgw: remove extra check in RGWGetObj::execute #5262
@yehudasa I don't see a clear way to handle it with the current logic.
send_response_data() is handling all cases using the protected field called 'ret' internally. It looks a design decision. The checks are just used to send the response data as soon as possible in execute method (via goto jumps). The 'ret' var works as the last error seen when send_response_data() crafts the response internally.
In execute() the return code is not relevant (void method) and it doesn't check the return code coming from send_response_data() neither.
To have two different paths, I guess we would need to break and pull part of the logic from send_response_data() to execute(). It would break the current virtual approach and part of the abstraction handling responses too.
I think keeping the current approach/patch (removing the last check) could be good enough having in mind the current code. What do you think?