-
Notifications
You must be signed in to change notification settings - Fork 554
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
add atomic reference tracker #2893
Conversation
Please see a somewhat concrete example of how this would be used here #2142 (comment). |
This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏 |
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.
Will take a look at it soon.
@@ -46,22 +46,19 @@ endif | |||
|
|||
GO_PROJECT=github.com/ceph/ceph-csi | |||
|
|||
CEPH_VERSION ?= $(shell . $(CURDIR)/build.env ; echo $${CEPH_VERSION}) | |||
# TODO: ceph_preview tag may be removed with go-ceph 0.16.0 | |||
GO_TAGS_LIST ?= $(CEPH_VERSION) ceph_preview |
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.
using preview API by default was not accepted see #2633 (comment) we need a stable API as this will be used in production?
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.
Here's a list of preview go-ceph APIs that this PR relies on:
rados.ReadOp.AssertVersion()
rados.ReadOp.GetOmapValuesByKeys()
and its return valuerados.ReadOpOmapGetValsByKeysStep struct
rados.ReadOp.Read()
rados.WriteOp.AssertVersion()
rados.WriteOp.Remove()
rados.WriteOp.SetXattr()
These are just bare bindings for librados for functions that are stable -- not really any brand new functionality that would be in a big risk of breaking in following two go-ceph releases (the time needed to graduate an API from preview to stable). Is this not acceptable too?
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.
So how do we do this, can anybody please let me know? Can I continue prototyping other parts of #2142 while this is in review, or are you postponing this PR until ceph_preview
build tag is no longer needed?
All of these bindings used in this PR are for RADOS primitives, which are very unlikely to change.
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.
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.
fine with me too. 👍
/retest ci/centos/mini-e2e-helm/k8s-1.21 |
/retest ci/centos/mini-e2e-helm/k8s-1.23 |
2 similar comments
/retest ci/centos/mini-e2e-helm/k8s-1.23 |
/retest ci/centos/mini-e2e-helm/k8s-1.23 |
lgtm. will wait for others to take final look at this. Cc @ceph/ceph-csi-maintainers |
/retest ci/centos/mini-e2e/k8s-1.22 |
@gman0 this looks good to me, I got a few minor comments/questions though. |
/retest ci/centos/mini-e2e-helm/k8s-1.23 |
1 similar comment
/retest ci/centos/mini-e2e-helm/k8s-1.23 |
Hmm, is the merge stuck? |
https://github.com/ceph/ceph-csi/pull/2893/checks?check_run_id=5688271877 |
ceph_preview tag is needed to make new go-ceph's RADOS read/write ops available Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
RT, reference tracker, is key-based implementation of a reference counter. Unlike an integer-based counter, RT counts references by tracking unique keys. This allows accounting in situations where idempotency must be preserved. It guarantees there will be no duplicit increments or decrements of the counter. Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
b96820d
to
3fbbdc5
Compare
/retest ci/centos/mini-e2e-helm/k8s-1.21 |
/retest ci/centos/mini-e2e-helm/k8s-1.22 |
/retest ci/centos/mini-e2e/k8s-1.21 |
/retest ci/centos/mini-e2e/k8s-1.22 |
/retest ci/centos/mini-e2e-helm/k8s-1.21 |
/retest ci/centos/mini-e2e-helm/k8s-1.22 |
/retest ci/centos/mini-e2e/k8s-1.21 |
/retest ci/centos/mini-e2e/k8s-1.22 |
@Mergifyio refresh |
✅ Pull request refreshed |
/retest ci/centos/mini-e2e/k8s-1.21 |
@Mergifyio refresh |
✅ Pull request refreshed |
@Mergifyio refresh |
✅ Pull request refreshed |
Describe what this PR does
RT, reference tracker, is key-based implementation of a reference counter.
Unlike an integer-based counter, RT counts references by tracking unique
keys. This allows accounting in situations where idempotency must be
preserved. It guarantees there will be no duplicit increments or decrements
of the counter.
It is directly needed by the snapshot-backed shallow volumes for CephFS, but is general enough for any other use-cases that need accounting.
Includes unit tests. They use "fake RADOS" interface, but I have run them under real Ceph locally too, and everything worked as expected.
Related issues
Part of #2142
Future concerns
The RADOS objects handled by this RT are versioned. Should the object layout ever need to change / some backwards-incompatible implementation change, it should be possible to safely do so.
Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>
: retest the<job-name>
after unrelatedfailure (please report the failure too!)
/retest all
: run this in case the CentOS CI failed to start/report any testprogress or results