WriteOp.RmOmapKeys now uses rados_write_op_omap_rm_keys2().
The entirety of removeOmapKeysStep struct was removed as it's not necessary for
it to own the various C-allocated values passed to
rados_write_op_omap_rm_keys2() as arguments. rados_write_op_omap_rm_keys2()
makes copies of all the string-based args [1], so it's sufficient for them to
be short lived.
[1] 2bd3dd512a/src/librados/librados_c.cc (L3888-L3902)
WriteOp.SetOmap now uses rados_write_op_omap_set2().
The entirety of setOmapStep struct was removed as it's not necessary for it to
own the various C-allocated values passed to rados_write_op_omap_set2()
as arguments. rados_write_op_omap_set2() makes copies of all the string-based
args [1], so it's sufficient for them to be short lived.
[1] 2bd3dd512a/src/librados/librados_c.cc (L3852-L3871)
BufferGroup is a helper structure that holds Go-allocated slices of
C-allocated strings and their respective lengths. Useful for C functions
that consume byte buffers with explicit length instead of null-terminated
strings.
add wrapper to set locator key on IOContext
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* mark API as PREVIEW and update docs
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* move new API call into own file to add preview build tag
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* reset locater with nil instead of a empty string
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* rename variables for naming consistency
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* update release versions for new API call
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
This change adds two log packages. One for the external go-ceph
consumers under common/log, and one for the internal use within the
go-ceph code under internal/log. The external package exports two
functions for consumers, SetWarnf() and SetDebugf(), that set a
logger for warnings and debug messages respectively. They take a
log.Printf compatible function as argument.
The internal package exports these functions as Warnf() and Debugf(),
which can be used by the go-ceph code to log warnings and debug
messages.
Signed-off-by: Sven Anderson <sven@redhat.com>
This change implements the bindings for the watch/notify APIs of
librados. Instead of callbacks, the watcher is implemented with more
Go-idiomatic channels. A watcher object exposes two read-only
channels, one to receive the notify events and one to receive
occuring errors.
Signed-off-by: Sven Anderson <sven@redhat.com>
The comments above Read and Write were very old and not up to our
current standards. Update them to be accurate and note that the
offset internal to the image type is not concurrency safe.
This also cleans up some old and unhelpful todos.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit implements binding for read_op_omap_get_vals_by_keys
RADOS Read operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
This commit implements binding for rados_write_op_setxattr
RADOS Write operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
These APIs already existed, and were considered stable in cephfs/admin
before getting moved. I initially was going to mark them preview but then
realized that cephfs/admin depends on them and having them marked
preview with the ceph_preview tag would break cephfs/admin. Due to the
above, I think an exception to the policy is warranted here as there
is not much new except the package itself.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
All of our <foo>/admin/ test suites have similar needs for rados conn
and wrapped debugging. Create a short package that is meant to only
be consumed by our test suites.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit implements binding for rados_read_op_assert_version
RADOS Read operation as well as rados_write_op_assert_version
RADOS Write operation.
Includes unit tests for both.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
This commit implements binding for rados_write_op_remove RADOS Write operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
This issue should have been fixed in ceph-containers already but for
whatever reason we don't seem to be getting the fix.
For now, disable the apache-arrow-centos repo.
Based on: 8b4c8dc730
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Mergify has not been working for weeks as they removed support for the
deprecated style we were relying on. This is my first attempt to
update it to the new style.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit implements binding for rados_write_op_cmpext RADOS Write operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
When testing the mirroing workflow, we will not explicitly check
on the mgr for the presence of the mirroring module before proceeding
with the tests. The plan is to have this cut down on test flakes.
The previous workaround also had a bug in that the 2nd sleep was in the
wrong location. Perhaps, fixing this alone would resolve the test
flakes, but this is more proper anyway.
Signed-off-by: John Mulligan <jmulligan@redhat.com>