@@ -36,7 +36,7 @@ const auto current_period = make_period("5", 5, "4");
3636
3737// mock puller that throws an exception if it's called
3838struct ErrorPuller : public RGWPeriodHistory ::Puller {
39- int pull (const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
39+ int pull (const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore ) override {
4040 throw std::runtime_error (" unexpected call to pull" );
4141 }
4242};
@@ -49,15 +49,15 @@ class RecordingPuller : public RGWPeriodHistory::Puller {
4949 public:
5050 explicit RecordingPuller (int error) : error(error) {}
5151 Ids ids;
52- int pull (const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
52+ int pull (const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore ) override {
5353 ids.push_back (id);
5454 return error;
5555 }
5656};
5757
5858// mock puller that returns a fake period by parsing the period id
5959struct NumericPuller : public RGWPeriodHistory ::Puller {
60- int pull (const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
60+ int pull (const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield, rgw::sal::ConfigStore* cfgstore ) override {
6161 // relies on numeric period ids to divine the realm_epoch
6262 auto realm_epoch = boost::lexical_cast<epoch_t >(id);
6363 auto predecessor = boost::lexical_cast<std::string>(realm_epoch-1 );
@@ -135,31 +135,31 @@ TEST(PeriodHistory, PullPredecessorsBeforeCurrent)
135135
136136 // create a disjoint history at 1 and verify that periods are requested
137137 // backwards from current_period
138- auto c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield);
138+ auto c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield, nullptr );
139139 ASSERT_FALSE (c1);
140140 ASSERT_EQ (-EFAULT, c1.get_error ());
141141 ASSERT_EQ (Ids{" 4" }, puller.ids );
142142
143143 auto c4 = history.insert (make_period (" 4" , 4 , " 3" ));
144144 ASSERT_TRUE (c4);
145145
146- c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield);
146+ c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield, nullptr );
147147 ASSERT_FALSE (c1);
148148 ASSERT_EQ (-EFAULT, c1.get_error ());
149149 ASSERT_EQ (Ids ({" 4" , " 3" }), puller.ids );
150150
151151 auto c3 = history.insert (make_period (" 3" , 3 , " 2" ));
152152 ASSERT_TRUE (c3);
153153
154- c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield);
154+ c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield, nullptr );
155155 ASSERT_FALSE (c1);
156156 ASSERT_EQ (-EFAULT, c1.get_error ());
157157 ASSERT_EQ (Ids ({" 4" , " 3" , " 2" }), puller.ids );
158158
159159 auto c2 = history.insert (make_period (" 2" , 2 , " 1" ));
160160 ASSERT_TRUE (c2);
161161
162- c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield);
162+ c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield, nullptr );
163163 ASSERT_TRUE (c1);
164164 ASSERT_EQ (Ids ({" 4" , " 3" , " 2" }), puller.ids );
165165}
@@ -172,22 +172,22 @@ TEST(PeriodHistory, PullPredecessorsAfterCurrent)
172172
173173 // create a disjoint history at 9 and verify that periods are requested
174174 // backwards down to current_period
175- auto c9 = history.attach (&dp, make_period (" 9" , 9 , " 8" ), null_yield);
175+ auto c9 = history.attach (&dp, make_period (" 9" , 9 , " 8" ), null_yield, nullptr );
176176 ASSERT_FALSE (c9);
177177 ASSERT_EQ (-EFAULT, c9.get_error ());
178178 ASSERT_EQ (Ids{" 8" }, puller.ids );
179179
180- auto c8 = history.attach (&dp, make_period (" 8" , 8 , " 7" ), null_yield);
180+ auto c8 = history.attach (&dp, make_period (" 8" , 8 , " 7" ), null_yield, nullptr );
181181 ASSERT_FALSE (c8);
182182 ASSERT_EQ (-EFAULT, c8.get_error ());
183183 ASSERT_EQ (Ids ({" 8" , " 7" }), puller.ids );
184184
185- auto c7 = history.attach (&dp, make_period (" 7" , 7 , " 6" ), null_yield);
185+ auto c7 = history.attach (&dp, make_period (" 7" , 7 , " 6" ), null_yield, nullptr );
186186 ASSERT_FALSE (c7);
187187 ASSERT_EQ (-EFAULT, c7.get_error ());
188188 ASSERT_EQ (Ids ({" 8" , " 7" , " 6" }), puller.ids );
189189
190- auto c6 = history.attach (&dp, make_period (" 6" , 6 , " 5" ), null_yield);
190+ auto c6 = history.attach (&dp, make_period (" 6" , 6 , " 5" ), null_yield, nullptr );
191191 ASSERT_TRUE (c6);
192192 ASSERT_EQ (Ids ({" 8" , " 7" , " 6" }), puller.ids );
193193}
@@ -275,7 +275,7 @@ TEST(PeriodHistory, AttachBefore)
275275 RGWPeriodHistory history (g_ceph_context, &puller, current_period);
276276 const DoutPrefix dp (g_ceph_context, 1 , " test rgw period history: " );
277277
278- auto c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield);
278+ auto c1 = history.attach (&dp, make_period (" 1" , 1 , " " ), null_yield, nullptr );
279279 ASSERT_TRUE (c1);
280280
281281 // verify that we pulled and merged all periods from 1-5
@@ -302,7 +302,7 @@ TEST(PeriodHistory, AttachAfter)
302302 RGWPeriodHistory history (g_ceph_context, &puller, current_period);
303303 const DoutPrefix dp (g_ceph_context, 1 , " test rgw period history: " );
304304
305- auto c9 = history.attach (&dp, make_period (" 9" , 9 , " 8" ), null_yield);
305+ auto c9 = history.attach (&dp, make_period (" 9" , 9 , " 8" ), null_yield, nullptr );
306306 ASSERT_TRUE (c9);
307307
308308 // verify that we pulled and merged all periods from 5-9
0 commit comments