Closed Elbehery closed 8 months ago
@Elbehery: This pull request references ETCD-349 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
So since pretty much all external functions call the refresh function (which write-locks the mutex), it's very unlikely that this will be able to properly use the read mutexes. So essentially you have a write-lock mutex on every function.
I wonder if it would be better to start a goroutine that write-locks and updates the cache (calling refresh) on a timer instead; since you're only updating the cache after a certain period. That way, each of the external functions would just read-lock and could actually access the data at the same time.
@dusk125 alternatively, I think it could be a normal mutex. This is not necessary a performance improvement, merely an attempt at reducing the amount of RPC calls to etcd. The remote calls take much longer than the write lock would be taken (just a few instructions to check whether it would need a refresh).
Timer is also cool with me, but needs to have some additional error handling to bubble up when a cache is known to be outdated by more than a minute.
Sounds good Thomas, then a normal mutex would be good, keep it simple! :D
/label tide/merge-method-squash
/retest-required
/retest-required
/retest-required
/retest-required
/retest-required
the failing jobs are due to other failures, not related to this PR
/retest-required
/retest-required
/retest-required
@tjungblu ci/prow/e2e-operator-fips
failure not related to this PR
shall we override ?
why? it's not required, or is it? :rofl:
why? it's not required, or is it? 🤣
doch doch, it is required .. but the failure has nothing to do with this change https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-etcd-operator/1208/pull-ci-openshift-cluster-etcd-operator-master-e2e-operator-fips/1764984733453783040
/retest-required
/retest-required
/retest-required
/retest-required
/override ci/prow/e2e-operator-fips
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Elbehery, tjungblu
The full list of commands accepted by this bot can be found here.
The pull request process is described here
@tjungblu: Overrode contexts on behalf of tjungblu: ci/prow/e2e-operator-fips
/retest-required
Remaining retests: 0 against base HEAD 2f6e1dec53a275fb2d11049203986cd79d8c747d and 2 for PR HEAD 62dcc73a23c18444b6813ab080efea5e99f748ec in total
/retest-required
/retest-required
/retest-required
/retest-required
/retest-required
/retest-required
/retest-required
/retest-required
@Elbehery: The following tests failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
ci/prow/e2e-aws-etcd-recovery | 62dcc73a23c18444b6813ab080efea5e99f748ec | link | false | /test e2e-aws-etcd-recovery |
ci/prow/e2e-gcp-qe-no-capabilities | 62dcc73a23c18444b6813ab080efea5e99f748ec | link | false | /test e2e-gcp-qe-no-capabilities |
Full PR test history. Your PR dashboard.
/override ci/prow/e2e-agnostic-ovn-upgrade
/override ci/prow/e2e-operator-fips
@tjungblu: Overrode contexts on behalf of tjungblu: ci/prow/e2e-agnostic-ovn-upgrade
@tjungblu: Overrode contexts on behalf of tjungblu: ci/prow/e2e-operator-fips
[ART PR BUILD NOTIFIER]
This PR has been included in build cluster-etcd-operator-container-v4.16.0-202403111814.p0.gfd67e61.assembly.stream.el9 for distgit cluster-etcd-operator. All builds following this will include this PR.
resolves https://issues.redhat.com/browse/ETCD-349