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

Potential race condition: systems_in_db() called twice #66

Open
sneumann opened this issue Aug 12, 2016 · 1 comment
Open

Potential race condition: systems_in_db() called twice #66

sneumann opened this issue Aug 12, 2016 · 1 comment

Comments

@sneumann
Copy link
Contributor

Hi,
if at the same time as this call:

sys_name = as.character(unlist(lapply(systems_in_db(),function(x) x$system_name)))

somebody inserts a new system, then sys_name and sys_id can be out of sync.
Very low priority, but keep in mind "what could possibly go wrong" :-)

@sneumann
Copy link
Contributor Author

Actually, the line above could use name2sys_oid() from
https://github.com/stanstrup/PredRet/blob/master/PredRetR/R/database_queries.R#L203
and there you'd fix the potential race condition.

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

No branches or pull requests

1 participant