Skip to content

Commit

Permalink
indexer: remove diesel async (MystenLabs#12297)
Browse files Browse the repository at this point in the history
## Description 

Diesel async was introduced to optimize indexer throughput but did not
see significant improvement, also saw some issues on building like
https://mysten-labs.slack.com/archives/C04FG4Q7YJ3/p1685265857488579

## Test Plan 

CI

local run to make sure indexer reader & writer can both work.

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
gegaowp authored Jun 1, 2023
1 parent 8b44f3c commit a290023
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 297 deletions.
155 changes: 2 additions & 153 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions crates/sui-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ bcs = "0.1.4"
chrono = { version = "0.4.23", features = ["clock", "serde"] }
clap = { version = "3.2.17", features = ["derive"] }
diesel = { version = "2.0.3", features = ["chrono", "postgres", "r2d2", "serde_json", "64-column-tables"] }
rustls = { version = "0.20.4", features = ["dangerous_configuration"]}
tokio-postgres-rustls = "0.9.0"
tokio-postgres = "0.7.7"
diesel-async = { version = "0.2.1", features = ["postgres", "deadpool"] }
diesel-derive-enum = { version = "2.0.1", features = ["postgres"] }
futures = "0.3.23"
jsonrpsee = { git="https://github.com/wlmyng/jsonrpsee.git", rev= "b1b300784795f6a64d0fcdf8f03081a9bc38bde8", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-indexer/benches/indexer_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ fn indexer_benchmark(c: &mut Criterion) {

let rt: Runtime = Runtime::new().unwrap();
let (mut checkpoints, store) = rt.block_on(async {
let (blocking_cp, async_cp) = new_pg_connection_pool(&db_url).await.unwrap();
let blocking_cp = new_pg_connection_pool(&db_url).await.unwrap();
reset_database(&mut blocking_cp.get().unwrap(), true).unwrap();
let registry = Registry::default();
let indexer_metrics = IndexerMetrics::new(&registry);

let store = PgIndexerStore::new(async_cp, blocking_cp, indexer_metrics).await;
let store = PgIndexerStore::new(blocking_cp, indexer_metrics).await;

let checkpoints = (0..150).map(create_checkpoint).collect::<Vec<_>>();
(checkpoints, store)
Expand Down
Loading

0 comments on commit a290023

Please sign in to comment.