-
Notifications
You must be signed in to change notification settings - Fork 344
DAOS-18690 vos: handle DTX commit under space pressure #18039
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
Changes from all commits
e84a9af
eea16c4
5d3fac8
3bc77c6
c8b79cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| /** | ||||||
| * (C) Copyright 2019-2024 Intel Corporation. | ||||||
| * (C) Copyright 2025 Hewlett Packard Enterprise Development LP | ||||||
| * (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP | ||||||
| * | ||||||
| * SPDX-License-Identifier: BSD-2-Clause-Patent | ||||||
| */ | ||||||
|
|
@@ -196,19 +196,13 @@ dtx_handler(crt_rpc_t *rpc) | |||||
| if (unlikely(din->di_epoch == 1)) | ||||||
| D_GOTO(out, rc = -DER_IO); | ||||||
|
|
||||||
| while (i < din->di_dtx_array.ca_count) { | ||||||
| if (i + count > din->di_dtx_array.ca_count) | ||||||
| count = din->di_dtx_array.ca_count - i; | ||||||
| /* The count of DTX entries will not exceed DTX_THRESHOLD_COUNT. */ | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot directly assertion check the value that is from network. If the sender offered invalid value, in spite of by wrong or intentionally, then |
||||||
| rc1 = dtx_commit_large(cont->sc_hdl, (struct dtx_id *)din->di_dtx_array.ca_arrays, | ||||||
| (int)din->di_dtx_array.ca_count, false, NULL); | ||||||
| if (rc1 < 0) | ||||||
|
knard38 marked this conversation as resolved.
|
||||||
| D_GOTO(out, rc = rc1); | ||||||
|
|
||||||
| dtis = (struct dtx_id *)din->di_dtx_array.ca_arrays + i; | ||||||
| rc1 = vos_dtx_commit(cont->sc_hdl, dtis, count, false, NULL); | ||||||
| if (rc1 > 0) | ||||||
| committed += rc1; | ||||||
| else if (rc == 0 && rc1 < 0) | ||||||
| rc = rc1; | ||||||
|
|
||||||
| i += count; | ||||||
| } | ||||||
| committed += rc1; | ||||||
|
|
||||||
| if (din->di_flags.ca_count > 0) | ||||||
| flags = din->di_flags.ca_arrays; | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No return after unconditional assert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some static analysis tools may warning as "miss return" or similar for such case.