-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
@@ -18,6 +18,11 @@ | |||
|
|||
namespace rgw::sal::sfs::sqlite { | |||
|
|||
struct SQLiteBucketStats { |
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.
Suggestion: Move into SQLiteBuckets and remove the 'SQLiteBucket' prefix.
} | ||
|
||
return true; | ||
}); |
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.
This could probably be one sql statement with storage.select()?
Does RGW call this a lot?
pseudo sql:
select
count(object_id) as obj_count,
sum(size) as size,
from buckets, objects, versioned objects
where buckets.bucket_id = objects.bucket.id and objects.uuid = versioned_object.object_id
group by object_id
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
6158fc8
to
646fda3
Compare
646fda3
to
55a88e0
Compare
inner_join<DBObject>( | ||
on(is_equal(&DBObject::uuid, &DBVersionedObject::object_id)) | ||
), | ||
where(is_equal(&DBObject::bucket_id, bucket_id)) |
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.
This sums / counts deleted versions. Add a is_equal(COMMITTED) ?
55a88e0
to
6cd689c
Compare
@irq0 mind another go? |
LGTM Looks like we pass 2 more s3 tests and qa/rgw/store/sfs/../fixtures/s3tr_excuses.csv needs two rows less 🥳 (Fix for the truncated output in the test results already in flight https://github.com/aquarist-labs/s3gw/pull/760) |
ack, I'll remove those. :) |
Signed-off-by: Joao Eduardo Luis <[email protected]>
6cd689c
to
ac8bcad
Compare
pushed with excuses removed, lets see how that goes |
everything is green 🎉 @irq0 need a green check mark to merge this |
By updating bucket stats we enable operations like
HeadBucket
to provide the custom body that RGW populates, which includes the number of objects on the bucket, and the bucket's size.Fixes: aquarist-labs/s3gw-tools#196
Signed-off-by: Joao Eduardo Luis <[email protected]>