-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iota-indexer] Remove mysql-feature gated code from indexer, ungate postgres-feature code #4954
[iota-indexer] Remove mysql-feature gated code from indexer, ungate postgres-feature code #4954
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 4 Skipped Deployments
|
eed1312
to
723daa6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good with minor suggestions
crates/iota-indexer/README.md
Outdated
@@ -171,5 +171,5 @@ Note that you need an existing database for this to work. Using the DATABASE_URL | |||
|
|||
```sh | |||
# Change the RPC_CLIENT_URL to http://0.0.0.0:9000 to run indexer against local validator & fullnode | |||
cargo run --bin iota-indexer --features mysql-feature --no-default-features -- --db-url "<DATABASE_URL>" --rpc-client-url "https://api.devnet.iota.cafe:443" --fullnode-sync-worker --reset-db | |||
cargo run --bin iota-indexer -- --db-url "<DATABASE_URL>" --rpc-client-url "https://api.devnet.iota.cafe:443" --fullnode-sync-worker --reset-db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole Run with TiDB...
section is now obsolete and can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in a6eb68e
stored.senders.first() | ||
} | ||
}) else { | ||
let Some(Some(sender_bytes)) = ({ stored.senders.first() }) else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Simplification
let Some(Some(sender_bytes)) = ({ stored.senders.first() }) else { | |
let Some(Some(sender_bytes)) = stored.senders.first() else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in f501d28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't help but feel like maybe this is too much. Do we really not want to support this kind of extensibility in the future? We could just remove the feature and leave the generics to allow for the possibility.
I am afraid I see little merit in keeping the generics just in case we will need it in the future. It adds complexity to the API, and makes it hard to reason about its use, or maintain it while working on or extending dependent components, when we only see a single database being supported. |
Am I wrong in thinking that users of the lib could add their own implementations? If that's the case, we are removing that option. |
You are not wrong, but the fact remains: This is just a possibility, and I am of the opinion that adding complexity to the API is best dictated by actual feature requests, or feedback. This is not the case here. Also, this library is not the same as the ingestion framework ( At any case, we can certainly revisit if the need arises. |
…ostgres-feature code (#4954) * Remove mysql-feature gated code from indexer, ungate postgres-feature code * Remove empty default features from Cargo.tomls * Simplify code * Remove TiDB readme section
…ostgres-feature code (#4954) * Remove mysql-feature gated code from indexer, ungate postgres-feature code * Remove empty default features from Cargo.tomls * Simplify code * Remove TiDB readme section
…ostgres-feature code (#4954) * Remove mysql-feature gated code from indexer, ungate postgres-feature code * Remove empty default features from Cargo.tomls * Simplify code * Remove TiDB readme section
Description of change
Remove all code gated by
mysql-feature
feature flag.Always enable all code gated by
postgres-feature
feature flag, and remove the flag.Links to any relevant issues
solves part of #4904
Type of change
How the change has been tested
cargo ci-clippy
cargo nextest run -p iota-graphql-rpc --features pg_integration --no-fail-fast --test-threads 1
cargo test --package=iota-indexer --profile simulator --features shared_test_runtime
cargo test --package=iota-indexer --features pg_integration -- --test-threads 1
Change checklist
Tick the boxes that are relevant to your changes, and delete any items that are not.