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

Avoid onldb master usage when possible #336

Merged
merged 3 commits into from
Apr 8, 2022
Merged

Conversation

genevb
Copy link
Contributor

@genevb genevb commented Mar 30, 2022

This is a general sweep of code in the repository to avoid accessing the online master DB unless writing, and possibly use offline replicas if not using code from within the online enclave. People tend to copy existing code when they write new codes and it's best if everyone, old and new, makes a habit of reading from replicas (@dmarkh may wish to comment).

@akioogawa , I also updated some logic you use in StRoot/StFcsFastSimulatorMaker/macro/thresh.pl for determining which backup port to access, so please have a look. You were relying on a Jan. 1st rollover from one database to another, but Oct. 1st is more appropriate.

-Gene

@dmarkh
Copy link
Contributor

dmarkh commented Mar 30, 2022

Thank you, Gene! I totally support your changes.

Yes, using master DBs for read-only operations should be avoided in most cases. STAR has plenty of replica DB servers available - these will generally work faster than masters, and will not prevent/block STAR services from inserting data into master DBs.

Copy link
Member

@plexoos plexoos left a comment

Choose a reason for hiding this comment

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

There are scripts in /StRoot/StFgtPool and /StRoot/StSpinPool that also use onldb.starp.bnl.gov. Why leave them out?

@genevb genevb requested review from zlchang and veprbl as code owners March 31, 2022 16:40
@starsdong
Copy link
Member

Akio and Daniel, if you can take a review on the relevant part that you are the owner, comment/approve the PR? Thanks

@plexoos
Copy link
Member

plexoos commented Apr 6, 2022

Does it make sense to wait for other approvals any longer?

@starsdong
Copy link
Member

Dmitri, please proceed and merge this PR. Thanks

@plexoos plexoos merged commit 3c48e34 into star-bnl:main Apr 8, 2022
@genevb genevb deleted the NO_ONLDB branch April 12, 2022 01:25
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.

6 participants