s3gw-tech / s3gw

Container able to run on a Kubernetes cluster, providing S3-compatible endpoints to applications.
https://s3gw.tech
Apache License 2.0
126 stars 20 forks source link

Implement omap keys related functions. #763

Open 0xavi0 opened 11 months ago

0xavi0 commented 11 months ago

This issue raised after rebasing on top of ceph's 18.2.0.

The test_get_object_torrent is using the omap_get_vals_by_keys call that is not implemented yet in sfs

2023-10-18T14:52:46.880+0200 7f608ac5f6c0  2 req 0 0.003333386s s3:get_obj executing
2023-10-18T14:52:46.880+0200 7f608ac5f6c0 10 req 0 0.003333386s s3:get_obj > object_read::prepare bucket:sfstest-godmouwe4ljmjg4khzwzq-1 obj:Avatar.mpg size:7340032 versionid: conditionals:(ifmatch:0x0 ifnomatch:0x0 ifmod:0x0 ifunmod:0x0)
2023-10-18T14:52:46.880+0200 7f608ac5f6c0  5 req 0 0.003333386s NOTICE: announce_list is empty
2023-10-18T14:52:46.880+0200 7f608ac5f6c0 20 req 0 0.003333386s NOTICE: head obj oid= sfstest-godmouwe4ljmjg4khzwzq-1.1697633566802812419_Avatar.mpg
2023-10-18T14:52:46.880+0200 7f608ac5f6c0 10 req 0 0.003333386s omap_get_vals_by_keys: TODO
2023-10-18T14:52:46.880+0200 7f608ac5f6c0  0 req 0 0.003333386s ERROR: omap_get_vals_by_keys failed: -95
2023-10-18T14:52:46.880+0200 7f608ac5f6c0  0 req 0 0.003333386s s3:get_obj ERROR: failed to get_torrent_file ret= -95

The omap_get_vals_by_keys prints the TODO and returns -ENOTSUP

int SFSObject::omap_get_vals_by_keys(
    const DoutPrefixProvider* dpp, const std::string& /*oid*/,
    const std::set<std::string>& /*keys*/, Attrs* /*vals*/
) {
  ldpp_dout(dpp, 10) << __func__ << ": TODO" << dendl;
  return -ENOTSUP;
}
jecluis commented 11 months ago

what kind of S3 operations rely on omap keys?