Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use property to control whether duplicate IDs are checked #295

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

m-fila
Copy link
Contributor

@m-fila m-fila commented Feb 26, 2025

BEGINRELEASENOTES

  • Replace UniqueIDGenSvc property ThrowIfDuplicate with CheckDuplicates. The service will cache ids and check duplicates only if CheckDuplicates is set to true. It's enabled by default for the Debug builds.

ENDRELEASENOTES

The property will control whether to cache the ids so the long running jobs can disable it to avoid possible memory exhaustion.

As suggested in #294 (comment) the option to control whether in case of duplicate to throw an exception or print error is removed. Now it'll throw an exception. I think it's ok for debugging.

The default value of CheckDuplicates depends on a build type and is taken from NDEBUG

Part of #294

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

Since we are doing this for debug builds only, would it make sense to make m_uniqueIDs a map of hash / seed to (event, run number, algo name) so that we have access to both entries for a collision? I guess if you are debugging a collision that would be quite useful.

@m-fila m-fila force-pushed the uidgen_checkduplicates branch from 7d2e508 to 0c24ed4 Compare February 27, 2025 15:51
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