@@ -303,7 +303,7 @@ impl DeploymentStore {
303303 layout. query ( & logger, conn, query) . await
304304 }
305305
306- fn check_intf_uniqueness (
306+ async fn check_intf_uniqueness (
307307 & self ,
308308 conn : & mut PgConnection ,
309309 layout : & Layout ,
@@ -326,7 +326,7 @@ impl DeploymentStore {
326326 Ok ( ( ) )
327327 }
328328
329- fn apply_entity_modifications < ' a > (
329+ async fn apply_entity_modifications < ' a > (
330330 & self ,
331331 conn : & mut PgConnection ,
332332 layout : & Layout ,
@@ -345,7 +345,7 @@ impl DeploymentStore {
345345 section. end ( ) ;
346346
347347 let section = stopwatch. start_section ( "check_interface_entity_uniqueness" ) ;
348- self . check_intf_uniqueness ( conn, layout, group) ?;
348+ self . check_intf_uniqueness ( conn, layout, group) . await ?;
349349 section. end ( ) ;
350350
351351 let section = stopwatch. start_section ( "apply_entity_modifications_insert" ) ;
@@ -414,20 +414,20 @@ impl DeploymentStore {
414414 }
415415
416416 /// Panics if `idx` is not a valid index for a read only pool.
417- fn read_only_conn (
417+ async fn read_only_conn (
418418 & self ,
419419 idx : usize ,
420420 ) -> Result < PooledConnection < ConnectionManager < PgConnection > > , Error > {
421421 self . read_only_pools [ idx] . get ( ) . map_err ( Error :: from)
422422 }
423423
424- pub ( crate ) fn get_replica_conn (
424+ pub ( crate ) async fn get_replica_conn (
425425 & self ,
426426 replica : ReplicaId ,
427427 ) -> Result < PooledConnection < ConnectionManager < PgConnection > > , Error > {
428428 let conn = match replica {
429429 ReplicaId :: Main => self . get_conn ( ) ?,
430- ReplicaId :: ReadOnly ( idx) => self . read_only_conn ( idx) ?,
430+ ReplicaId :: ReadOnly ( idx) => self . read_only_conn ( idx) . await ?,
431431 } ;
432432 Ok ( conn)
433433 }
@@ -615,7 +615,7 @@ impl DeploymentStore {
615615
616616 // Only used for tests
617617 #[ cfg( debug_assertions) ]
618- pub ( crate ) fn drop_all_metadata ( & self ) -> Result < ( ) , StoreError > {
618+ pub ( crate ) async fn drop_all_metadata ( & self ) -> Result < ( ) , StoreError > {
619619 // Delete metadata entities in each shard
620620
621621 // This needs to touch all the tables in the subgraphs schema
@@ -1161,12 +1161,14 @@ impl DeploymentStore {
11611161 let layout = self . layout ( conn, site. clone ( ) ) . await ?;
11621162
11631163 let section = stopwatch. start_section ( "apply_entity_modifications" ) ;
1164- let count = self . apply_entity_modifications (
1165- conn,
1166- layout. as_ref ( ) ,
1167- batch. groups ( ) ,
1168- stopwatch,
1169- ) ?;
1164+ let count = self
1165+ . apply_entity_modifications (
1166+ conn,
1167+ layout. as_ref ( ) ,
1168+ batch. groups ( ) ,
1169+ stopwatch,
1170+ )
1171+ . await ?;
11701172 section. end ( ) ;
11711173
11721174 layout. rollup ( conn, last_rollup, & batch. block_times ) . await ?;
0 commit comments