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

A dead instance revived into a different domain will cause SequelizeUniqueConstraintError error #5944

Closed
Kinuseka opened this issue Aug 20, 2023 · 1 comment

Comments

@Kinuseka
Copy link

Describe the current behavior

Lets say instance A is following to instance B and instance B dies due to unknown reasons and was revived as Instance C. However since instance C kept the same database as before they will have the same uuids, same videos, same everything. However instance A believes that instance C's videos are not the same as instance B. The root cause of this issue is that the database does not like duplicate uuids as it likes to keep it "unique".

Steps to reproduce

  1. An already followed Instance dies
  2. The dead instance follows the update-host script
  3. Follow back instance from its new host.
  4. Observe logs

Describe the expected behavior

There are 2 ways to fix this;
1.) This might be for the better, keep the error as is however make the "update-host" to regenerate their uuids.
This ensures that uuids will stay unique and so therefore updating the host will need a new identity for their videos, these prevents conflicts and possibly fraudulent activity which will cause spoofing videos of a dead instance.

2.) Make the follower adjust, this solution will cause the follower to create a NEW UUID if the uuid is not unique and simply link it from the source.

Additional information

  • PeerTube instance:
    • URL:
    • Version: 5.2.0
    • NodeJS version: v16
    • Ffmpeg version:
@Chocobozzz
Copy link
Owner

Hi,

Unfortunately updating host of an instance that has already federated is not supported. Updating UUIDs is an idea, but we don't have enough resource to support this use case as we rely on video UUIDs in multiple places in PeerTube code.

#549 may be a solution for this kind of use case

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

2 participants