From b9c2fb61bd7c53b9003396e59cee1112d3d1de48 Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Thu, 9 Nov 2023 16:40:45 -0500 Subject: [PATCH] rgw: fix flight load_bucket call The interface to the load_bucket call changed when tenant and bucket name are specified and user is no longer required. This updates the flight call to load_bucket to reflect those changes. Signed-off-by: J. Eric Ivancich --- src/rgw/rgw_flight.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_flight.cc b/src/rgw/rgw_flight.cc index 7cc8a460dc4..955edcced89 100644 --- a/src/rgw/rgw_flight.cc +++ b/src/rgw/rgw_flight.cc @@ -673,6 +673,11 @@ arw::Status FlightServer::DoGet(const flt::ServerCallContext &context, ARROW_ASSIGN_OR_RAISE(FlightKey key, TicketToFlightKey(request)); ARROW_ASSIGN_OR_RAISE(FlightData fd, get_flight_store()->get_flight(key)); +#if 0 + /* load_bucket no longer requires a user parameter. Keep this code + * around a bit longer until we fully figure out how permissions + * will impact this code. + */ std::unique_ptr user = driver->get_user(fd.user_id); if (user->empty()) { INFO << "user is empty" << dendl; @@ -685,10 +690,11 @@ arw::Status FlightServer::DoGet(const flt::ServerCallContext &context, } INFO << "user is " << user->get_display_name() << dendl; } +#endif std::unique_ptr bucket; - - ret = driver->load_bucket(&dp, &(*user), fd.tenant_name, fd.bucket_name, + ret = driver->load_bucket(&dp, + rgw_bucket(fd.tenant_name, fd.bucket_name), &bucket, null_yield); if (ret < 0) { ERROR << "get_bucket returned " << ret << dendl; -- 2.39.5