metabase: Drop search-only indexes #1323

Merged
fyrchik merged 6 commits from dstepanov-yadro/frostfs-node:feat/drop_metabase_index into master 2024-08-22 08:21:43 +00:00

This should reduce the size of the metabase and improve its performance.

This should reduce the size of the metabase and improve its performance.
dstepanov-yadro force-pushed feat/drop_metabase_index from 63192cc2a8 to 5cd9e24abe 2024-08-20 10:05:51 +00:00 Compare
dstepanov-yadro requested review from storage-core-committers 2024-08-20 12:26:43 +00:00
dstepanov-yadro requested review from storage-core-developers 2024-08-20 12:26:43 +00:00
fyrchik reviewed 2024-08-20 12:43:03 +00:00
@ -109,3 +100,3 @@
}
func selectExpiredObjectIDs(tx *bbolt.Tx, attr string, epoch uint64, containerID cid.ID, objectIDs []oid.ID) ([]oid.ID, error) {
func selectExpiredObjectIDs(tx *bbolt.Tx, epoch uint64, containerID cid.ID, objectIDs []oid.ID) ([]oid.ID, error) {
Owner

On a side-note, we allocate a slice here, only to convert it later from []oid.ID to []oid.Address. Maybe return []oid.Address from this function?

On a side-note, we allocate a slice here, only to convert it later from `[]oid.ID` to `[]oid.Address`. Maybe return `[]oid.Address` from this function?
Author
Member

fixed

fixed
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed feat/drop_metabase_index from 1d02d53e09 to 156a25de4a 2024-08-20 12:50:17 +00:00 Compare
fyrchik reviewed 2024-08-20 12:52:42 +00:00
@ -10,3 +10,3 @@
// version contains current metabase version.
const version = 2
const version = 3
Owner

Could you also change VERSION.md accordingly?

Could you also change `VERSION.md` accordingly?
Author
Member

Done

Done
fyrchik marked this conversation as resolved
fyrchik reviewed 2024-08-20 12:52:50 +00:00
fyrchik approved these changes 2024-08-20 12:58:06 +00:00
@ -263,3 +284,2 @@
return updateSplitInfoIndex(tx, objKey, cnr, bucketName, si)
return updateSplitInfoIndex(tx, objKey, addr.Container(), bucketName, si)
}
Owner

:(

:(
dstepanov-yadro force-pushed feat/drop_metabase_index from 156a25de4a to 57a1f45be1 2024-08-20 13:09:25 +00:00 Compare
aarifullin reviewed 2024-08-20 13:52:34 +00:00
@ -407,2 +384,2 @@
if err != nil {
return err
func hasExpirationEpoch(obj *objectSDK.Object) (uint64, bool) {
for _, attr := range obj.Attributes() {
Member

Is it ok if an object has an EC-header? The best way is to check object search for EC-objects

Is it ok if an object has an EC-header? The best way is to check `object search` for EC-objects
Author
Member

Thx, fixed

Thx, fixed
aarifullin marked this conversation as resolved
dstepanov-yadro force-pushed feat/drop_metabase_index from 57a1f45be1 to b51476954d 2024-08-20 14:30:22 +00:00 Compare
dstepanov-yadro force-pushed feat/drop_metabase_index from b51476954d to 834dd6bb90 2024-08-21 06:33:52 +00:00 Compare
acid-ant approved these changes 2024-08-21 08:00:20 +00:00
aarifullin approved these changes 2024-08-22 07:47:50 +00:00
aarifullin left a comment
Member

OK with me

OK with me
fyrchik reviewed 2024-08-22 07:50:28 +00:00
@ -75,3 +75,3 @@
getPrm.SetAddress(objectCore.AddressOf(obj))
_, err = sh.Get(context.Background(), getPrm)
require.True(t, client.IsErrObjectNotFound(err), "expired object must be deleted")
require.True(t, client.IsErrObjectNotFound(err) || IsErrObjectExpired(err), "expired object must be deleted")
Owner

How come this test passed before?

How come this test passed before?
fyrchik referenced this pull request from a commit 2024-08-22 08:21:41 +00:00
fyrchik referenced this pull request from a commit 2024-08-22 08:21:42 +00:00
fyrchik merged commit 76f67ea34e into master 2024-08-22 08:21:43 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1323
No description provided.