entries(_entries),
pool(_pool), oid(_oid), cn(NULL)
{
+ stringstream s;
+ s << "set omap keys dest=" << pool.name << "/" << oid << " keys=[" << s.str() << "]";
+ for (auto i = entries.begin(); i != entries.end(); ++i) {
+ if (i != entries.begin()) {
+ s << ", ";
+ }
+ s << i->first;
+ }
+ s << "]";
+ set_description(s.str());
}
RGWRadosSetOmapKeysCR::~RGWRadosSetOmapKeysCR()
return r;
}
+ set_status("sending request");
+
librados::ObjectWriteOperation op;
op.omap_set(entries);
int RGWRadosSetOmapKeysCR::request_complete()
{
+ stringstream s;
+ int r = cn->completion()->get_return_value();
+
+ s << "request complete; ret=" << r;
+
+ set_status(s.str());
+
return cn->completion()->get_return_value();
}
entries(_entries), max_entries(_max_entries), rval(0),
pool(_pool), oid(_oid), cn(NULL)
{
+ stringstream s;
+ s << "set omap keys dest=" << pool.name << "/" << oid << " marker=" << marker;
+ set_description(s.str());
}
RGWRadosGetOmapKeysCR::~RGWRadosGetOmapKeysCR()
return r;
}
+ set_status("send request");
+
librados::ObjectReadOperation op;
op.omap_get_vals(marker, max_entries, entries, &rval);
pool(_pool), oid(_oid),
req(NULL)
{
+ stringstream s;
+ s << "rados lock dest=" << pool << "/" << oid << " lock=" << lock_name << " cookie=" << cookie << " duration=" << duration;
}
RGWSimpleRadosLockCR::~RGWSimpleRadosLockCR()
int RGWSimpleRadosLockCR::send_request()
{
+ set_status("sending request");
rgw_obj obj = rgw_obj(pool, oid);
req = new RGWAsyncLockSystemObj(stack->create_completion_notifier(),
store, NULL, obj, lock_name, cookie, duration);
int RGWSimpleRadosLockCR::request_complete()
{
+ stringstream s;
+ s << "request complete; ret=" << req->get_ret_status();
+ set_status(s.str());
return req->get_ret_status();
}
pool(_pool), oid(_oid),
req(NULL)
{
+ stringstream s;
+ s << "rados unlock dest=" << pool << "/" << oid << " lock=" << lock_name << " cookie=" << cookie;
+ set_description(s.str());
}
RGWSimpleRadosUnlockCR::~RGWSimpleRadosUnlockCR()
int RGWSimpleRadosUnlockCR::send_request()
{
+ set_status("sending request");
+
rgw_obj obj = rgw_obj(pool, oid);
req = new RGWAsyncUnlockSystemObj(stack->create_completion_notifier(),
store, NULL, obj, lock_name, cookie);
int RGWSimpleRadosUnlockCR::request_complete()
{
+ stringstream s;
+ s << "request complete; ret=" << req->get_ret_status();
+ set_status(s.str());
return req->get_ret_status();
}
reenter(this) {
for (;;) {
if (!has_product() && going_down) {
+ set_status("going down");
break;
}
+ set_status("waiting for product");
yield wait_for_product();
yield {
string entry;
while (consume(&entry)) {
+ set_status(string("adding entry: ") + entry);
entries[entry] = bufferlist();
if (entries.size() >= OMAP_APPEND_MAX_ENTRIES) {
break;
}
}
if (entries.size() >= OMAP_APPEND_MAX_ENTRIES || going_down) {
+ set_status(string("flushing to omap"));
call(new RGWRadosSetOmapKeysCR(store, pool, oid, entries));
entries.clear();
}