Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

synapse_port_db misbehaves unintuitively if you pass the wrong path to the sqlite.db #3982

Closed
ara4n opened this issue Sep 28, 2018 · 2 comments · Fixed by #14692 or #15306
Closed

synapse_port_db misbehaves unintuitively if you pass the wrong path to the sqlite.db #3982

ara4n opened this issue Sep 28, 2018 · 2 comments · Fixed by #14692 or #15306
Labels
A-Portdb Script for exporting sqlite data into postgres good first issue Good for newcomers O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution

Comments

@ara4n
Copy link
Member

ara4n commented Sep 28, 2018

and tries to migrate an empty DB

@neilisfragile neilisfragile added z-p2 (Deprecated Label) z-bug (Deprecated Label) labels Oct 5, 2018
@DMRobertson DMRobertson added T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. A-Portdb Script for exporting sqlite data into postgres S-Tolerable Minor significance, cosmetic issues, low or no impact to users. O-Uncommon Most users are unlikely to come across this or unexpected workflow good first issue Good for newcomers and removed z-bug (Deprecated Label) z-p2 (Deprecated Label) labels Aug 25, 2022
@DMRobertson
Copy link
Contributor

DMRobertson commented Aug 25, 2022

If anyone wants to take this on:

  • A good first step would be to use os.path.isfile just before here to check that args.sqlite_database is a file.
  • A more robust approach would be to follow the advice here and try to open the database in read-only mode (r) rather than read-write-create (rwc). (AFAICS the script only ever reads from the sqlite db and writes to the postgres DB.

@DMRobertson DMRobertson added the Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution label Aug 25, 2022
JeyRathnam added a commit to JeyRathnam/synapse that referenced this issue Dec 18, 2022
@clokep
Copy link
Member

clokep commented Mar 21, 2023

#14692 was backed out in #15301.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Portdb Script for exporting sqlite data into postgres good first issue Good for newcomers O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution
Projects
None yet
4 participants