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

Check directory file numbers when returning configuration #51

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

Conversation

tpoliaw
Copy link
Collaborator

@tpoliaw tpoliaw commented Jan 14, 2025

  • Add failing test to demonstrate required behaviour
  • Check directory for highest number when returning configuration

Fix for #50

I'm not convinced this doesn't just move the confusion elsewhere. It doesn't give the same get configuration latestScanNumber -> 0 followed by get next scan number -> 42 behaviour but does mean get configuration doesn't return the same configuration you've just set via set configuration.

Maybe get configuration would be better off returning a different type with db_number and dir_number as different fields?

@tpoliaw tpoliaw linked an issue Jan 14, 2025 that may be closed by this pull request
If the two numbers do not match, it is useful to see both in the configuration
to help debugging issues, especially around interactions with the GDA files.
@tpoliaw
Copy link
Collaborator Author

tpoliaw commented Jan 15, 2025

Maybe get configuration would be better off returning a different type with db_number and dir_number as different fields?

configuration field now returns a CurrentConfiguration that exposes a dbScanNumber and fileScanNumber so it is clear when there are discrepancies and there is less confusion around different numbers being returned from configuration and scan.

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.

Check directory for latest number when returning configuration
1 participant