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

fixstates skip IStateMachine::BACKENDSTORAGE for delete #103

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

matidau
Copy link
Collaborator

@matidau matidau commented Aug 19, 2024

Released under the GNU Affero General Public License (AGPL), version 3

What does this implement/fix? Explain your changes.

z-push-admin fixstates was deleting states of type IStateMachine::BACKENDSTORAGE as it doesn't store with a uuid

Does this close any currently open issues?

It might solve #92

Any relevant logs, error output, etc?

11:08:26 Checking for unreferenced (obsolete) state files: Processed: 1123 - Deleted: 7

@matidau
Copy link
Collaborator Author

matidau commented Aug 19, 2024

@eberproducts & @smartperson
If either of you could test this PR and let me know if it makes a difference when running fixstates, it would be appreciated.

@matidau matidau linked an issue Aug 19, 2024 that may be closed by this pull request
@smartperson
Copy link

👍 I think this works. I tried a few times. When I run sudo z-push-admin -a fixstates without the patch, it breaks the accounts on my devices. When I run sudo z-push-admin -a fixstates with the patch, the accounts continue to receive email.

When run without the PR:

Validating and fixing states (this can take some time):
        13:29:13 Checking username casings: Processed: 1 - Converted: 0 - Removed: 0
        13:29:13 Checking available devicedata & user linking: Processed: 1 - Fixed: 0
        13:29:13 Checking for unreferenced (obsolete) state files: Processed: 21 - Deleted: 1
        13:29:13 Checking for hierarchy folder data state: Devices: 1 - Processed: 1 - Fixed: 0 - Device+User without hierarchy: 0
        13:29:13 Checking flags of shared folders: Devices: 1 - Devices with additional folders: 0 - Fixed: 0

When run with the PR, after having added another d eivce to my account, as well:

Validating and fixing states (this can take some time):
        13:50:20 Checking username casings: Processed: 2 - Converted: 0 - Removed: 0
        13:50:20 Checking available devicedata & user linking: Processed: 2 - Fixed: 0
        13:50:20 Checking for unreferenced (obsolete) state files: Processed: 37 - Deleted: 0
        13:50:20 Checking for hierarchy folder data state: Devices: 2 - Processed: 2 - Fixed: 0 - Device+User without hierarchy: 0
        13:50:20 Checking flags of shared folders: Devices: 2 - Devices with additional folders: 0 - Fixed: 0

@matidau matidau merged commit 446e046 into Z-Hub:develop Aug 19, 2024
2 checks passed
@matidau matidau deleted the fixstates-backendstorage branch August 19, 2024 21:29
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.

iPhone loses sync between upgrades
2 participants