Skip to content

Commit 3fe5a59

Browse files
committed
fixup! Read and write users in different tasks
1 parent 1b34ae1 commit 3fe5a59

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/syn2mas/src/migration.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ async fn migrate_users(
226226
synapse: &mut SynapseReader<'_>,
227227
mut mas: MasWriter,
228228
count_hint: usize,
229-
state: MigrationState,
229+
mut state: MigrationState,
230230
rng: &mut impl RngCore,
231231
) -> Result<(MasWriter, MigrationState), Error> {
232232
let start = Instant::now();
@@ -254,6 +254,14 @@ async fn migrate_users(
254254
flags |= UserFlags::IS_GUEST;
255255
}
256256

257+
state.users.insert(
258+
CompactString::new(&mas_user.username),
259+
UserInfo {
260+
mas_user_id: mas_user.user_id,
261+
flags,
262+
},
263+
);
264+
257265
user_buffer
258266
.write(&mut mas, mas_user)
259267
.await

0 commit comments

Comments
 (0)