mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
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:
parent
7e5b2542ab
commit
140941cfa4
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user