Skip to content

Quota follow up: Buddy group accounting mode, refactoring, logging - #78

Open
rustybee42 wants to merge 5 commits into
mainfrom
rb/quota-followup
Open

Quota follow up: Buddy group accounting mode, refactoring, logging#78
rustybee42 wants to merge 5 commits into
mainfrom
rb/quota-followup

Conversation

@rustybee42

@rustybee42 rustybee42 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

See commits.

Depends on ThinkParQ/protobuf#78 (TODO: Update protobuf ref)

Related to https://github.com/ThinkParQ/beegfs-core/issues/4794

@rustybee42 rustybee42 self-assigned this Aug 13, 2026
@rustybee42
rustybee42 requested a review from a team as a code owner August 13, 2026 13:48
@rustybee42 rustybee42 changed the title Quota follow up: Buddy group accounting mode, refactoring Quota follow up: Buddy group accounting mode, refactoring, logging Aug 13, 2026
* Quota: Log information after the operations are completed with more
information at info level, remove the not so useful initial debug logs
* Promote and improve some other state logging
Required to get newest the newest sqlite, which allows adding
constraints using ALTER TABLE
Before, targets in buddy groups would count double towards the limits as
quota would just use the data from both. Now, only the primary target is
taken into account by default.

This has the consequence that potentially unmirrored data present on the
secondary will not be counted towards the quota anymore. And, if there
is a switchover, the numbers might suddenly change. We assume though,
that most customers have exclusive mirrored targets.

To get the old behavior, the accounting mode is stored with the buddy
groups and can be set via ctl. On updating management (from 8.x), it
will use the old behavior, adding new groups uses the new behavior.
Upgrading from v7 uses the new behavior as this usually makes more
sense and is already a breaking change.

* Also add modify_buddy_group() handler to change the accounting mode
and adapt the create_buddy_group() and get_buddy_groups() handlers
* Refactor the get_buddy_groups() big sql query, using string for
selecting columns
Test the accounting modes, making sure they work as expected + more.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant