Skip to content

Commit df12d93

Browse files
committed
clean-up
1 parent 126b579 commit df12d93

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

store/postgres/src/connection_pool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,6 @@ fn migrate_schema(logger: &Logger, conn: &mut PgConnection) -> Result<MigrationC
11361136
let mut harness = HarnessWithOutput::new(conn, &mut output);
11371137

11381138
info!(logger, "Running migrations");
1139-
// let result = conn.run_pending_migrations(MIGRATIONS);
11401139
let result = harness.run_pending_migrations(MIGRATIONS);
11411140
info!(logger, "Migrations finished");
11421141

store/postgres/src/deployment_store.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,8 @@ impl DeploymentStore {
584584
&self,
585585
namespace: &crate::primary::Namespace,
586586
) -> Result<(), StoreError> {
587-
let conn = &mut *self.get_conn()?;
588-
deployment::drop_schema(conn, namespace)
587+
let mut conn = self.get_conn()?;
588+
deployment::drop_schema(&mut conn, namespace)
589589
}
590590

591591
// Only used for tests
@@ -1412,21 +1412,6 @@ impl DeploymentStore {
14121412
}
14131413
}
14141414

1415-
// Don't revert past a graft point
1416-
let info = self.subgraph_info_with_conn(&mut conn, site.as_ref())?;
1417-
if let Some(graft_block) = info.graft_block {
1418-
if graft_block > block_ptr_to.number {
1419-
return Err(constraint_violation!(
1420-
"Can not revert subgraph `{}` to block {} as it was \
1421-
grafted at block {} and reverting past a graft point \
1422-
is not possible",
1423-
site.deployment.clone(),
1424-
block_ptr_to.number,
1425-
graft_block
1426-
));
1427-
}
1428-
}
1429-
14301415
self.rewind_or_truncate_with_conn(&mut conn, site, block_ptr_to, firehose_cursor, false)
14311416
}
14321417

store/postgres/src/primary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ impl<'a> Connection<'a> {
14521452
.filter(a::node_id.eq_any(&nodes))
14531453
.select((a::node_id, sql::<BigInt>("count(*)")))
14541454
.group_by(a::node_id)
1455-
.order_by(sql::<Integer>("count(*)"))
1455+
.order_by(sql::<BigInt>("count(*)"))
14561456
.load::<(String, i64)>(self.conn.as_mut())?;
14571457

14581458
// Any nodes without assignments will be missing from `assigned`

0 commit comments

Comments
 (0)