]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/flight: don't access non-existant flight store during GetObj 50143/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 16 Feb 2023 15:29:31 +0000 (10:29 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Thu, 16 Feb 2023 15:40:47 +0000 (10:40 -0500)
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>
src/rgw/rgw_flight_frontend.cc
src/rgw/rgw_op.cc
src/rgw/rgw_process_env.h

index 61defbdd662d3ca2d79fff56501fd94908e77e88..c29703fe5137525ba69c297e4c7ec00ab735dbb0 100644 (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;
 }
 
index 5bb0d398822546d97a5176f7e359cb59e9d57d27..311b629a3df0bdd0800805439cae9bfdd819fb92 100644 (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
 
index 7e3abad65a7ff9e11ed708a967f0571429032795..4becf21a10fe2b0069b860f7c9e56334508a1dfa 100644 (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
 };