Skip to content

[for minor release] Aggregate DataStore Accounting Requests - #8714

Open
chaen wants to merge 3 commits into
DIRACGrid:integrationfrom
chaen:aggregate_accounting
Open

[for minor release] Aggregate DataStore Accounting Requests#8714
chaen wants to merge 3 commits into
DIRACGrid:integrationfrom
chaen:aggregate_accounting

Conversation

@chaen

@chaen chaen commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

When the DataStore services go down, we quickly end up with a few millions ForwardDISET requests. This takes forever to execute because of the overhead of setting up a Request execution environment.
This PR adds the capability for the CleanReqDBAgent to batch together such requests.

Id also adds an extra index on the ReqDB (in the wiki already)

BEGINRELEASENOTES

*RMS
NEW: the CleanReqDBAgent can aggregate DataStore Requests together

*deployment

A new index needs to be added to the ReqDB

CREATE INDEX idx_request_status_notbefore_lastupdate ON Request (Status, NotBefore, LastUpdate) ALGORITHM=INPLACE LOCK=NONE;

ENDRELEASENOTES

@chaen
chaen requested a review from andresailer as a code owner July 24, 2026 13:00
@chaen
chaen force-pushed the aggregate_accounting branch 2 times, most recently from 5937517 to 2c30acc Compare July 27, 2026 08:34
@fstagni fstagni changed the title [9.1] Aggregate DataStore Accounting Requests [for minor release] Aggregate DataStore Accounting Requests Jul 31, 2026
@chaen
chaen force-pushed the aggregate_accounting branch 2 times, most recently from 2421b0b to 9e6ebff Compare July 31, 2026 13:56
Comment thread src/DIRAC/RequestManagementSystem/Agent/CleanReqDBAgent.py Outdated
Comment thread src/DIRAC/RequestManagementSystem/Agent/CleanReqDBAgent.py Outdated
@chaen
chaen force-pushed the aggregate_accounting branch from 9e6ebff to 2bf1f18 Compare September 1, 2026 14:21
@chaen
chaen force-pushed the aggregate_accounting branch from b6d3b18 to abefea9 Compare September 4, 2026 09:43

@fstagni fstagni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments.

Comment on lines +144 to +145
# Number of Accounting requests to fetch to batch
# 0 to disable (default)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being pedantic...

Suggested change
# Number of Accounting requests to fetch to batch
# 0 to disable (default)
# Max number of Accounting requests to fetch to batch
# 0 to disable (default)


if self.ACCOUNTING_BATCH_MAX_REQUESTS:
self.log.info(f"Accounting max requests = {self.ACCOUNTING_BATCH_MAX_REQUESTS} request/cycle")
self.log.info(f"Accouting batch size = {self.ACCOUNTING_BATCH_SIZE} requests")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.log.info(f"Accouting batch size = {self.ACCOUNTING_BATCH_SIZE} requests")
self.log.info(f"Accounting batch size = {self.ACCOUNTING_BATCH_SIZE} requests")

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.

3 participants