Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kraken: rgw: first write also tries to read object #14515

Merged
merged 4 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,9 @@ OPTION(rbd_mirror_image_state_check_interval, OPT_INT, 30) // interval to get im
OPTION(nss_db_path, OPT_STR, "") // path to nss db


OPTION(rgw_max_chunk_size, OPT_INT, 512 * 1024)
OPTION(rgw_max_chunk_size, OPT_INT, 4 * 1024 * 1024)
OPTION(rgw_put_obj_min_window_size, OPT_INT, 16 * 1024 * 1024)
OPTION(rgw_put_obj_max_window_size, OPT_INT, 64 * 1024 * 1024)
OPTION(rgw_max_put_size, OPT_U64, 5ULL*1024*1024*1024)

/**
Expand Down
2 changes: 0 additions & 2 deletions src/rgw/rgw_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ using ceph::crypto::MD5;

#define RGW_BUCKETS_OBJ_SUFFIX ".buckets"

#define RGW_MAX_PENDING_CHUNKS 16

#define RGW_FORMAT_PLAIN 0
#define RGW_FORMAT_XML 1
#define RGW_FORMAT_JSON 2
Expand Down
8 changes: 5 additions & 3 deletions src/rgw/rgw_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,8 @@ class RGWPutObj_Filter : public RGWPutObjDataProcessor
virtual int handle_data(bufferlist& bl, off_t ofs, void **phandle, rgw_obj *pobj, bool *again) override {
return next->handle_data(bl, ofs, phandle, pobj, again);
}
virtual int throttle_data(void *handle, const rgw_obj& obj, bool need_to_wait) override {
return next->throttle_data(handle, obj, need_to_wait);
virtual int throttle_data(void *handle, const rgw_obj& obj, uint64_t size, bool need_to_wait) override {
return next->throttle_data(handle, obj, size, need_to_wait);
}
}; /* RGWPutObj_Filter */

Expand Down Expand Up @@ -1606,11 +1606,13 @@ static inline int put_data_and_throttle(RGWPutObjDataProcessor *processor,
void *handle;
rgw_obj obj;

uint64_t size = data.length();

int ret = processor->handle_data(data, ofs, &handle, &obj, &again);
if (ret < 0)
return ret;

ret = processor->throttle_data(handle, obj, need_to_wait);
ret = processor->throttle_data(handle, obj, size, need_to_wait);
if (ret < 0)
return ret;

Expand Down