Skip to content

Commit 6dd5605

Browse files
authored
syn2mas: remove obsolete TODOs (#4267)
2 parents ec92da7 + cf14876 commit 6dd5605

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

crates/syn2mas/src/mas_writer/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,10 +1084,7 @@ impl MasWriter {
10841084
}
10851085

10861086
// How many entries to buffer at once, before writing a batch of rows to the
1087-
// database. TODO tune: didn't see that much difference between 4k and 64k
1088-
// (4k: 13.5~14, 64k: 12.5~13s — streaming the whole way would be better,
1089-
// especially for DB latency, but probably fiiine and also we won't be able to
1090-
// stream to two tables at once...)
1087+
// database.
10911088
const WRITE_BUFFER_BATCH_SIZE: usize = 4096;
10921089

10931090
/// A function that can accept and flush buffers from a `MasWriteBuffer`.

crates/syn2mas/src/migration.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ async fn migrate_devices(
713713
.ok()
714714
});
715715

716-
// TODO skip access tokens for deactivated users
717716
write_buffer
718717
.write(
719718
&mut mas,

crates/syn2mas/src/synapse_reader/checks.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ pub fn synapse_config_check(synapse_config: &Config) -> (Vec<CheckWarning>, Vec<
140140
warnings.push(CheckWarning::DisableUserConsentAfterMigration);
141141
}
142142

143-
// TODO provide guidance on migrating these
143+
// TODO provide guidance on migrating these auth systems
144+
// that are not directly supported as upstreams in MAS
144145
if synapse_config.cas_config.enabled {
145146
warnings.push(CheckWarning::ExternalAuthSystem("CAS"));
146147
}
@@ -150,8 +151,6 @@ pub fn synapse_config_check(synapse_config: &Config) -> (Vec<CheckWarning>, Vec<
150151
if synapse_config.jwt_config.enabled {
151152
warnings.push(CheckWarning::ExternalAuthSystem("JWT"));
152153
}
153-
154-
// TODO provide guidance on migrating these
155154
if synapse_config.password_config.enabled && !synapse_config.password_config.localdb_enabled {
156155
warnings.push(CheckWarning::ExternalAuthSystem(
157156
"non-standard password provider plugin",

crates/syn2mas/src/synapse_reader/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ pub struct SynapseUser {
193193
/// Note that not all numeric user IDs are guests; guests can upgrade their
194194
/// account!
195195
pub is_guest: SynapseBool,
196-
// TODO do we care about upgrade_ts (users who upgraded from guest accounts to real accounts)
197196
/// The ID of the appservice that created this user, if any.
198197
pub appservice_id: Option<String>,
199198
}
@@ -252,7 +251,6 @@ pub struct SynapseRefreshableTokenPair {
252251
/// This is a safety measure against other processes changing the data
253252
/// underneath our feet. It's still not a good idea to run Synapse at the same
254253
/// time as the migration.
255-
// TODO not complete!
256254
const TABLES_TO_LOCK: &[&str] = &[
257255
"users",
258256
"user_threepids",
@@ -328,7 +326,6 @@ impl<'conn> SynapseReader<'conn> {
328326
///
329327
/// - An underlying database error whilst committing the transaction.
330328
pub async fn finish(self) -> Result<(), Error> {
331-
// TODO enforce that this is called somehow.
332329
self.txn.commit().await.into_database("end transaction")?;
333330
Ok(())
334331
}

0 commit comments

Comments
 (0)