ctx.invalidate(obj);
}
+void RGWRados::SystemObject::invalidate_state()
+{
+ ctx.invalidate(obj);
+}
+
int RGWRados::Object::prepare_atomic_modification(ObjectWriteOperation& op, bool reset_obj, const string *ptag,
const char *if_match, const char *if_nomatch, bool removal_op)
{
public:
SystemObject(RGWRados *_store, RGWObjectCtx& _ctx, rgw_obj& _obj) : store(_store), ctx(_ctx), obj(_obj), state(NULL) {}
+ void invalidate_state();
+
RGWRados *get_store() { return store; }
rgw_obj& get_obj() { return obj; }
RGWObjectCtx& get_ctx() { return ctx; }
int request_len = READ_CHUNK_LEN;
rgw_obj obj(bucket, key);
+ obj_version original_readv;
+ if (objv_tracker && !objv_tracker->read_version.empty()) {
+ original_readv = objv_tracker->read_version;
+ }
+
do {
RGWRados::SystemObject source(rgwstore, obj_ctx, obj);
RGWRados::SystemObject::Read rop(&source);
ret = rop.read(0, request_len - 1, bl, objv_tracker, refresh_version);
if (ret == -ECANCELED) {
/* raced, restart */
+ if (!original_readv.empty()) {
+ /* we were asked to read a specific obj_version, failed */
+ return ret;
+ }
+ if (objv_tracker) {
+ objv_tracker->read_version.clear();
+ }
+ source.invalidate_state();
continue;
}
if (ret < 0)