Bug 2325408

Summary: [RGW] HEAD on bucket shall not traverse all bucket index shards
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Harald Klein <hklein>
Component: RGWAssignee: J. Eric Ivancich <ivancich>
Status: VERIFIED --- QA Contact: sohan singh <sohsingh>
Severity: medium Docs Contact: Rivka Pollack <rpollack>
Priority: medium    
Version: 7.1CC: cbodley, ceph-eng-bugs, cephqe-warriors, ckulal, ivancich, rpollack, tserlin, vimishra
Target Milestone: ---Flags: mbenjamin: needinfo? (ivancich)
Target Release: 8.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-19.2.1-113.el9cp Doc Type: Enhancement
Doc Text:
.HeadBucket requests are now less resource intensive Previously, all HeadBucket requests required querying all the shards to assemble statistics, which made the requests resource intensive operations. With this enhancement, the HeadBucket API now reports the `X-RGW-Bytes-Used` and `X-RGW-Object-Count` headers only when the `read-stats` query string is explicitly included in the API request. As a result, HeadBucket requests are now less resource intensive but results received, when specified.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2351689    

Description Harald Klein 2024-11-12 09:19:29 UTC
Description of problem:

A HEAD request on a bucket does trigger traversal of all bucket index shards

Version-Release number of selected component (if applicable):

RHCS 7.1

How reproducible:

HEAD request on /bucketname 

Steps to Reproduce:
1. HEAD request on bucket
2. watch index shard rados operations

Actual results:

High pressure on OMAP

Expected results:

As the response body is suppressed in the HEAD request and the aim likely is to check existence, it would be preferred if the index shard traversal could be skipped for such request. This would reduce the performance impact on large buckets.

Additional info:

https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html

This is also used e.g. by jclouds in the bucketExists() method.