-
Notifications
You must be signed in to change notification settings - Fork 65
apollo_storage: add AppState struct for axum server #10407
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
base: main-v0.14.1
Are you sure you want to change the base?
apollo_storage: add AppState struct for axum server #10407
Conversation
49bdfa4 to
b57a52a
Compare
Itay-Tsabary-Starkware
left a comment
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion
crates/apollo_storage/src/storage_reader_server.rs line 62 at r2 (raw file):
storage_reader: Arc<StorageReader>, request_handler: Arc<RequestHandler>, semaphore: Arc<Semaphore>,
That's not needed in this context; please remove.
Code quote:
semaphore: Arc<Semaphore>,b57a52a to
961790e
Compare
nadin-Starkware
left a comment
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
crates/apollo_storage/src/storage_reader_server.rs line 62 at r2 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
That's not needed in this context; please remove.
Done.
Itay-Tsabary-Starkware
left a comment
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.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions
crates/apollo_storage/src/storage_reader_server.rs line 57 at r3 (raw file):
RequestHandler: StorageReaderServerHandler<Request, Response>, { storage_reader: Arc<StorageReader>,
This is cloneable, so no need to wrap it in an arc
(I think internally it uses arc anyway)
Code quote:
StorageReader
Itay-Tsabary-Starkware
left a comment
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.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @nadin-Starkware)
crates/apollo_storage/src/storage_reader_server.rs line 58 at r3 (raw file):
{ storage_reader: Arc<StorageReader>, request_handler: Arc<RequestHandler>,
Any reason why RequestHandler wouldn't be Clone ? If not, please add it as a trait bound, and remove arc
Code quote:
Arc<RequestHandler>
Itay-Tsabary-Starkware
left a comment
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.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @nadin-Starkware)
crates/apollo_storage/src/storage_reader_server.rs line 84 at r3 (raw file):
pub fn new( storage_reader: Arc<StorageReader>, request_handler: Arc<RequestHandler>,
Regardless of the changes above, can these be without arc, and wrapped internally?
Code quote:
storage_reader: Arc<StorageReader>,
request_handler: Arc<RequestHandler>,
Itay-Tsabary-Starkware
left a comment
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.
Reviewable status: 0 of 2 files reviewed, 4 unresolved discussions (waiting on @nadin-Starkware)
crates/apollo_storage/Cargo.toml line 38 at r3 (raw file):
tempfile = { workspace = true, optional = true } thiserror.workspace = true tokio = { workspace = true, features = ["sync"] }
What requires this feature?
Code quote:
features = ["sync"] 
No description provided.