-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[indexer][test cluster] support indexer backed rpc in cluster test and add some indexer reader tests #19906
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
.collect(); | ||
|
||
let object_resp = http_client.multi_get_objects(object_digests, None).await?; | ||
assert_eq!(5, object_resp.len()); |
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.
assert_eq on object_digests and digests from object_resp?
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 added an assert_eq
comparing the results from fullnode and indexer, and actually found a discrepancy due to us not sorting by object ids. Also fixed in the latest commit.
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.
thanks for setting this up
b5bd544
to
b951c52
Compare
03e5eaa
to
e5de934
Compare
|
||
// TODO: this only starts indexer writer and reader (jsonrpc server) today. | ||
// Consider adding graphql server here as well. | ||
pub(crate) async fn setup_indexer_backed_rpc( |
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.
This should simply be the new
function of IndexerHandle
. It will make this function a lot more discoverable.
let mut cancellation_tokens = vec![]; | ||
let database = TempDb::new().unwrap(); | ||
let pg_address = database.database().url().as_str().to_owned(); | ||
let indexer_jsonrpc_address = format!("127.0.0.1:{}", get_available_port("127.0.0.1")); |
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.
There should already be some localhost and port util function somewhere.
@@ -0,0 +1,84 @@ | |||
// Copyright (c) Mysten Labs, Inc. |
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.
Consider just naming this file test_indexer_handler
let mut data_ingestion_path = None; | ||
|
||
if self.indexer_backed_rpc { | ||
if self.data_ingestion_dir.is_none() { |
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.
Could this code be moved to line 1138?
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.
It cannot. self.start_swarm()
right after this block uses self.data_ingestion_dir
.
Description
This PR adds support in TestCluster to start indexer writer and indexer backed jsonrpc so that any testing done using TestCluster and fullnode jsonrpc can now be easily switched to using indexer jsonrpc. It's a step needed towards deprecation of fullnode jsonrpc. And a few tests are added/adapted from existing rpc tests.
Test plan
Added tests.
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.