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

Deleting a room seems to succeed, but the room remains #145

Closed
sumpfralle opened this issue Jun 27, 2024 · 3 comments
Closed

Deleting a room seems to succeed, but the room remains #145

sumpfralle opened this issue Jun 27, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@sumpfralle
Copy link

After one of my users joined the matrixhq-Room the database space requirements started to expand rapidly. Thus, I decided to remove and block this room:

synadm room delete --block --new-room-user-id "$CONTACT_MATRIX_ID" --room-name "$INFO_ROOM_NAME" --message "$INFO_TEXT" "$ROOM_ID"

The call resulted in a loooong list of room members, which I acknowledged. The final message of the call was this:

... long list of room members ...
Are you sure you want to delete this room? (y/N): y
delete_id  kBcTewOtVvXeyRac

Thus, I assumed that the room was gone.

But in fact it is still here and it still contains one of our local users:

synadm room members "$ROOM_ID" | grep ":$LOCAL_MATRIX_DOMAIN"

Now I am confused.

I assumed, that the synadm room delete command would remove the local user from the room and delete the room (since it is not related to local users anymore).

But this does not seem to happen.

Should I try to use the --force-purge option, even though there were no warnings or errors emitted during the room delete call?

Thank you for your time!

Relevant software versions:

  • synadm: 0.46
  • matrix-synapse: v1.99
@JacksonChen666
Copy link
Collaborator

JacksonChen666 commented Jun 27, 2024

synadm room delete uses Synapse's Delete Room API v2 by default, which returns with a delete_id where you can check the status of the room deletion (synadm room delete-status). The v1 API is the one that waits before room deletion is complete (usable with --v1 to synadm room delete), however that's deprecated in Synapse.

We would definitely say in synadm that you can check on the room deletion status, and that deletion with the v2 API is not immediate and asynchronous.

@JacksonChen666 JacksonChen666 added the documentation Improvements or additions to documentation label Jun 27, 2024
JacksonChen666 added a commit that referenced this issue Jun 27, 2024
@JacksonChen666
Copy link
Collaborator

I've updated synadm room delete --help in 874638b and now it's like this:

Usage: synadm room delete [OPTIONS] ROOM_ID

  Delete and possibly purge a room.

  By default, the v2 API is used, which will return a delete_id and delete the
  room asynchronously instead of waiting for a room to be deleted (the v1 API
  will wait for the room to be deleted). You can check the status of the room
  deletion with synadm room delete-status.

Options:
  [...]
  --v1                         Use version 1 of the room delete API instead of
                               version 2, which will wait until the room
                               deletion is complete.
  -h, --help                   Show this message and exit.

Does that help clarify things?


Previous:

Usage: synadm room delete [OPTIONS] ROOM_ID

  Delete and possibly purge a room.

Options:
  [...]
  --v1                         Use version 1 of the room delete API instead of
                               version 2
  -h, --help                   Show this message and exit.

@sumpfralle
Copy link
Author

Yes, that wording will be helpful for future users, I guess.

Thank you for your quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants