rgw/flight: don't access non-existant flight store during GetObj

The front end must be configured via ceph.conf to start up both the
flight_server and the flight_store. RGWGetObj needs to check for the
existence of a flight_store prior to trying to use it.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
This commit is contained in:
J. Eric Ivancich 2023-02-16 10:29:31 -05:00
parent 7e5b2542ab
commit 140941cfa4
3 changed files with 14 additions and 6 deletions

View File

@ -49,7 +49,11 @@ FlightFrontend::FlightFrontend(RGWProcessEnv& _env,
FlightFrontend::~FlightFrontend() {
delete env.flight_server;
env.flight_server = nullptr;
delete env.flight_store;
env.flight_store = nullptr;
INFO << "flight server shut down" << dendl;
}

View File

@ -2237,10 +2237,14 @@ void RGWGetObj::execute(optional_yield y)
}
#ifdef WITH_ARROW_FLIGHT
if (ofs == 0) {
// insert a GetObj_Filter to monitor and create flight
flight_filter.emplace(s, filter);
filter = &*flight_filter;
if (s->penv.flight_store) {
if (ofs == 0) {
// insert a GetObj_Filter to monitor and create flight
flight_filter.emplace(s, filter);
filter = &*flight_filter;
}
} else {
ldpp_dout(this, 0) << "ERROR: flight_store not created in " << __func__ << dendl;
}
#endif

View File

@ -43,8 +43,8 @@ struct RGWProcessEnv {
#ifdef WITH_ARROW_FLIGHT
// managed by rgw:flight::FlightFrontend in rgw_flight_frontend.cc
rgw::flight::FlightServer* flight_server;
rgw::flight::FlightStore* flight_store;
rgw::flight::FlightServer* flight_server = nullptr;
rgw::flight::FlightStore* flight_store = nullptr;
#endif
};