Skip to content

Lock RDF cache files during writing process - #26

Draft
moritzmolch wants to merge 5 commits into
mainfrom
feat-rdf-cache-lock
Draft

Lock RDF cache files during writing process#26
moritzmolch wants to merge 5 commits into
mainfrom
feat-rdf-cache-lock

Conversation

@moritzmolch

Copy link
Copy Markdown
Contributor

Parallel write and read accesses to RDF cache files let the program fail. To harden the excecution of the script, a lock is added when writing and when loading such an RDataFrame, so that a RDF cache file is only accessed when the writing process has finished.

@moritzmolch
moritzmolch marked this pull request as draft January 22, 2026 10:20

@a-monsch a-monsch 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.

There is still the files missing that propagate lock to Process_calculation files from ff_calculation and ff_correction?

Edit: Realized that this is still a draft.

Comment thread helper/ff_functions.py
def decorator(function: Callable) -> Callable:
@functools.wraps(function)
def wrapper(*args: Any, **kwargs: Any) -> ROOT.RDataFrame:
lock = kwargs;get("lock")

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.

; should be .?

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.

2 participants