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

Extend get_run() to support secondary instances #1992

Merged
merged 1 commit into from
May 7, 2024

Conversation

ppigazzini
Copy link
Collaborator

@ppigazzini ppigazzini commented May 7, 2024

Simplify the coding of the APIs moving the logic of primary/secondary
instance in the RunDB class.
Drop old debug code.

@ppigazzini ppigazzini added server server side changes refactoring non functional code improvement labels May 7, 2024
@ppigazzini
Copy link
Collaborator Author

@vdbergh I would like to drop the DEBUG code in rundb.py, do you agree?

@vdbergh
Copy link
Contributor

vdbergh commented May 7, 2024

This is a good start! It may be good to note that the new get_run() only provides read only access on secondary instances (i.e. buffer() will not work).

I am thinking of an improvement that would not come with the caveat that one must be careful that a task has been saved to the db.

The idea would be to create an api (hosted by the primary instance) to force the primary instance to write a run to disk, if it is dirty.

@vdbergh
Copy link
Contributor

vdbergh commented May 7, 2024

@vdbergh I would like to drop the DEBUG code in rundb.py, do you agree?

Yes. It hasn't been used for ages and maybe does not even work...

@ppigazzini ppigazzini force-pushed the primary branch 2 times, most recently from b72bb04 to 85d5a59 Compare May 7, 2024 16:18
Simplify the coding of the APIs moving the logic of primary/secondary
instance in the RunDB class.
Drop old debug code.
@ppigazzini ppigazzini merged commit d28ec43 into official-stockfish:master May 7, 2024
19 checks passed
@ppigazzini ppigazzini deleted the primary branch May 7, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring non functional code improvement server server side changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants