Repository navigation
DAOS-17322 ddb: DTX aggregation with ddb (Part 2) - #16746
Conversation
|
Ticket title is 'DTX aggregation with ddb' |
52ac348 to
65436bd
Compare
|
Test stage Unit Test on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/2/testReport/ |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/2/testReport/ |
|
Test stage Unit Test with memcheck on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/2/testReport/ |
|
Test stage Unit Test bdev with memcheck on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/2/testReport/ |
65436bd to
fbff07e
Compare
|
Test stage Unit Test on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/3/testReport/ |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/3/testReport/ |
|
Test stage Unit Test with memcheck on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/3/testReport/ |
|
Test stage Unit Test bdev with memcheck on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/3/testReport/ |
a70b32a to
79e20a2
Compare
* DAOS-17322 ddb: DTX aggregation with ddb This preliminary PR introduce the following modifications: - Cleanup of the SCons file src/utils/ddb/tests/SConscript - Fix miscellaneous issues detected by clangd linter. - Add a new DDB sub command dtx_stat allowing to print statistics on DTX entries. - This PR will be followed by the PR #16746 introducing a new DDB sub command dtx_aggr allowing to aggregate DTX entries with DDB. Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
79e20a2 to
c6ff645
Compare
c6ff645 to
d99caab
Compare
Fix clang format issues. Features: aggregation Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
|
Test stage Unit Test on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/23/testReport/ |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/23/testReport/ |
|
Test stage Unit Test with memcheck on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16746/23/testReport/ |
Fix unit test. Features: aggregation Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
Fix function argument name. Features: aggregation Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
Fix function argument comment. Features: aggregation Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
| * \return Zero on success, negative value if error. | ||
| * \return Negative value if error, zero if all DTX entries with an epoch lower | ||
| * or equal to ep_max have been aggregated, one if all the targeted DTX | ||
| * entries may not have been aggregated. |
There was a problem hiding this comment.
I would suggest:
Zero if maybe more DTX entries can be aggregated.
Positive value if all qualified DTX entries have been removed.
Negative value for error.
Then only dtx aggregation via ddb needs to check the postive return value, all the other existing vos_dtx_aggregate() callers do not change return value checking logic.
There was a problem hiding this comment.
I would suggest:
Zero if maybe more DTX entries can be aggregated. Positive value if all qualified DTX entries have been removed. Negative value for error.Then only dtx aggregation via ddb needs to check the postive return value, all the other existing
vos_dtx_aggregate()callers do not change return value checking logic.
- Fix comment
There was a problem hiding this comment.
I would suggest:
Zero if maybe more DTX entries can be aggregated. Positive value if all qualified DTX entries have been removed. Negative value for error.Then only dtx aggregation via ddb needs to check the postive return value, all the other existing
vos_dtx_aggregate()callers do not change return value checking logic.
- Fix comment
Fixed with commit c6ee641
| /* Parse a string representing a date into an epoch */ | ||
| int | ||
| ddb_date2epoch(const char *date, uint64_t *epoch); | ||
| ddb_date2cmt_time(const char *date, uint64_t *cmt_time); |
There was a problem hiding this comment.
Please refresh the comment to match the changes.
There was a problem hiding this comment.
Please refresh the comment to match the changes.
- Fix comment
There was a problem hiding this comment.
Please refresh the comment to match the changes.
- Fix comment
Fixed with commit c6ee641
| ddb_printf(ctx, "\t- %s%s", prefix, align); | ||
|
|
||
| rc = 0; | ||
| for (i = 0; i < 3; i++) { |
There was a problem hiding this comment.
It will be more safe to pass the length of epoch_stats as parameter instead of hard coded as "3".
There was a problem hiding this comment.
It will be more safe to pass the length of
epoch_statsas parameter instead of hard coded as "3".
- Use constant instead of hard coded value
There was a problem hiding this comment.
It will be more safe to pass the length of
epoch_statsas parameter instead of hard coded as "3".
- Use constant instead of hard coded value
Fixed with commit c6ee641
| ddb_printf(ctx, "\t- %s%s", prefix, align); | ||
|
|
||
| rc = 0; | ||
| for (i = 0; i < 3; i++) { |
There was a problem hiding this comment.
Similar as above.
- Use constant instead of hard coded value
There was a problem hiding this comment.
Similar as above.
- Use constant instead of hard coded value
Fixed with commit c6ee641
| goto done; | ||
| args->cmt_cnt += cnt; | ||
|
|
||
| args->cmt_cnt += args_tmp.cmt_cnt; |
There was a problem hiding this comment.
For details case, move it after calculating the mean value for time/epoch?
There was a problem hiding this comment.
Arghhhh, too quick copy/paste from my canceled PR https://github.com/daos-stack/daos/pull/16954/files#diff-c5fc3d2ed692ce1cc27be1a6d725d458e14d22d35374f71e40dd8921b6365698R1442
Thanks a lot to have found this issue, which also some hole into the unit tests.
- Fix invalid mean calculation.
-
Improve unit test of theddb_run_dtx_stat()function.
There was a problem hiding this comment.
Adding new unit tests to have full control over the behaviour of ddb_run_dtx_stat(), makes the testing code over complicated for a non critical feature. Thus, I will not add new unit tests accurately checking the mean computation and other DTX commit statistics.
Is it OK for you @Nasf-Fan ?
There was a problem hiding this comment.
Arghhhh, too quick copy/paste from my canceled PR https://github.com/daos-stack/daos/pull/16954/files#diff-c5fc3d2ed692ce1cc27be1a6d725d458e14d22d35374f71e40dd8921b6365698R1442 Thanks a lot to have found this issue, which also some hole into the unit tests.
- Fix invalid mean calculation.
Improve unit test of theddb_run_dtx_stat()function.
Fixed with commit c6ee641
There was a problem hiding this comment.
Adding new unit tests to have full control over the behaviour of
ddb_run_dtx_stat(), makes the testing code over complicated for a non critical feature. Thus, I will not add new unit tests accurately checking the mean computation and other DTX commit statistics. Is it OK for you @Nasf-Fan ?
That's fine for me.
| ddb_error(ctx, "Failed to close container "); | ||
| itp_print_full(ctx, itp); | ||
| ddb_errorf(ctx, ": " DF_RC "\n", DP_RC(rc)); | ||
| return rc; |
There was a problem hiding this comment.
This return is unnecessary since there is another following return.
There was a problem hiding this comment.
This
returnis unnecessary since there is another followingreturn.
- Remove useless return
There was a problem hiding this comment.
This
returnis unnecessary since there is another followingreturn.
- Remove useless return
Fixed with commit c6ee641
…/daos-17322-part2
Fix reviewers comments: - Fix comments - Use constant instead of hard coded value - Fix invalid mean calculation - Remove useless return Features: aggregation Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
…/daos-17322-part2
Fix invalid last epoch aggregation computation. Features: aggregation Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
Fix minor coding sytle. Features: aggregation Signed-off-by: Cedri,c Koch-Hofer <cedric.koch-hofer@hpe.com>
|
@kjacque , please could you have a look at the go code part of the code. |
Fix clang format issues. Features: aggregation Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
|
Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-16746/30/execution/node/1291/log |
|
Test stage Functional Hardware Medium Verbs Provider MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-16746/30/execution/node/1336/log |
|
Test stage Functional Hardware Large MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-16746/30/execution/node/1475/log |
|
@knard38 could you please check whether any of the failures are related to your changes? |
The CI failures are known CI issues:
I have restarted a run of the functional test https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-16746/31/pipeline-overview/ |
@johannlombardi , all the functional test have been passed with the new run confirming the hypothesis that the CI failures of the build 30 are not related to this PR. The DCO failure is a mistake from my side on an old commit:I prefer to not amend this commit to not touch the commit history. |
| a.String("path", "Optional, VOS tree path of a container to aggregate.", grumble.Default("")) | ||
| }, | ||
| Flags: func(f *grumble.Flags) { | ||
| f.Uint64("t", "cmt_time", math.MaxUint64, "Max aggregfation committed time in seconds") |
There was a problem hiding this comment.
minor, typo
| f.Uint64("t", "cmt_time", math.MaxUint64, "Max aggregfation committed time in seconds") | |
| f.Uint64("t", "cmt_time", math.MaxUint64, "Max aggregation committed time in seconds") |
There was a problem hiding this comment.
minor, typo
I am going to fix it in a follow-up PR
| func (cmdStr ddbCmdStr) Complete(match string) (comps []flags.Completion) { | ||
| // hack to get at command names | ||
| ctx, cleanup, err := InitDdb() | ||
| ctx, cleanup, err := InitDdb(nil) |
There was a problem hiding this comment.
Is it OK to pass nil here?
There was a problem hiding this comment.
Yep, the associated complete function are indeed never using the log attributes.
I agree, that it is not very nice but it is the only way that I found to pass the log object for the standard call of InitDB().
| D_ERROR("Failed to update tail for DTX aggregation " | ||
| UMOFF_PF": "DF_RC"\n", | ||
| rc = umem_tx_add_ptr(umm, &dbd->dbd_committed_data[0], | ||
| sizeof(dbd->dbd_committed_data[0]) * dbd->dbd_count); |
There was a problem hiding this comment.
Not a big deal, but it's better to change it to "sizeof(...) * (dbd->dbd_count - dtx_aggr_count)" right?
| vos_oi_exist(daos_handle_t coh, daos_unit_oid_t oid); | ||
|
|
||
| /* Timing statistic of DTX entries */ | ||
| #define DTX_TIME_STAT_COUNT 3 |
There was a problem hiding this comment.
style: I think the clearer style would be like:
enum {
DTX_TIME_STAT_MIN,
DTX_TIME_STAT_MAX,
DTX_TIME_STAT_MEAN,
DTX_TIME_STAT_COUNT
};
so you can use them as alias of the array index instead of using 0, 1, 2
There was a problem hiding this comment.
I am going to fix it in a following-up PR

Description
Add the following new command to ddb:
Steps for the author:
After all prior steps are complete: