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

osd: always send returnvec-on-errors for client's retry #55570

Merged
merged 1 commit into from
Feb 16, 2024
Merged
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
7 changes: 5 additions & 2 deletions src/osd/PrimaryLogPG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4288,8 +4288,11 @@ void PrimaryLogPG::execute_ctx(OpContext *ctx)
}
reply->add_flags(CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK);
// append to pg log for dup detection - don't save buffers for now
Copy link
Contributor

@idryomov idryomov Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the "don't save buffers for now" bit still valid? It looks like it predates the introduction of RETURNVEC flag in 2019.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's still the same (by the buffers I understand e.g. a write op's payload).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I interpreted it as write op's reply payload (i.e. out data). If you believe the comment to be valid, I withdraw ;)

record_write_error(op, soid, reply, result,
ctx->op->allows_returnvec() ? ctx : nullptr);
// store op's returnvec unconditionally-on-errors to ensure coherency
// with the original request handling (see `ignore_out_data` above).
record_write_error(
op, soid, reply, result,
(ctx->op->allows_returnvec() || result < 0) ? ctx : nullptr);
close_op_ctx(ctx);
return;
}
Expand Down