Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Sync ignored table names in synapse_port_db to current database schema #7717

Merged
merged 5 commits into from Jun 23, 2020

Conversation

clokep
Copy link
Contributor

@clokep clokep commented Jun 17, 2020

Noticed in #7711, it seems some of the tables we ignore in synapse_port_db don't exist anymore. I took a try at syncing the list to the real tables.

@clokep
Copy link
Contributor Author

clokep commented Jun 17, 2020

I don't know if we need to keep the older table names as well for backwards compatibility? I don't think so since the script ensures that all schema deltas have been applied before running.

@richvdh richvdh changed the title Update table names in synapose_port_db for changes. Update table names in synapse_port_db for changes. Jun 17, 2020
@clokep clokep changed the title Update table names in synapse_port_db for changes. Sync ignored table names in synapse_port_db to current database schema Jun 17, 2020
changelog.d/7717.bugfix Outdated Show resolved Hide resolved
Comment on lines +135 to +140
"user_directory_search_content",
"user_directory_search_docsize",
"user_directory_search_segdir",
"user_directory_search_segments",
"user_directory_search_stat",
"user_directory_search_pos",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if all of these are regenerated or not...I might be totally off base here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a bunch of these are actually sqlite specific stuff anyway (to support full text search)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That means we should include them, correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed

Comment on lines +141 to +142
"users_who_share_private_rooms",
"users_in_public_room",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two tables were renamed at some point, I believe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like they were. They're regenerated because somewhere later in the port code we explicitly reset the entry in the user_directory_stream_pos table

@clokep clokep requested a review from a team June 18, 2020 15:41
@@ -0,0 +1 @@
Sync the list of tables ignored by `synapse_port_db` with the current database schema.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you word this as Fix.... please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Thanks for the review!

@clokep clokep merged commit 2411025 into develop Jun 23, 2020
@clokep clokep deleted the clokep/port-db-tables branch June 23, 2020 11:33
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit 'dc80a0762':
  1.16.0rc1
  Back out MSC2625 implementation (#7761)
  Additional configuration options for auto-join rooms (#7763)
  Add some metrics for inbound and outbound federation processing times (#7755)
  Explain the purpose of the "tests" conditional dependency requirement (#7751)
  Add another yield point to state res v2 (#7746)
  Move flake8 to end. Don't exit script on failure (#7738)
  Make tox actions work on Debian 10 (#7703)
  Yield during large v2 state res. (#7735)
  add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675)
  Set Content-Length for Metrics requests (#7730)
  Sync ignored table names in synapse_port_db to current database schema (#7717)
  Allow local media to be marked as safe from being quarantined. (#7718)
  Convert directory handler to async/await (#7727)
  Speed up state res v2 across large state differences. (#7725)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants