Skip to content

Avoid onldb master usage when possible#336

Merged
plexoos merged 3 commits intostar-bnl:mainfrom
genevb:NO_ONLDB
Apr 8, 2022
Merged

Avoid onldb master usage when possible#336
plexoos merged 3 commits intostar-bnl:mainfrom
genevb:NO_ONLDB

Conversation

@genevb
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 veprbl and zlchang as code owners March 31, 2022 16:40
@starsdong
Copy link
Copy Markdown
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
Copy Markdown
Member

plexoos commented Apr 6, 2022

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

@starsdong
Copy link
Copy Markdown
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