Skip to content
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

taskman up iot config #615

Merged
merged 9 commits into from
Oct 9, 2023
Merged

taskman up iot config #615

merged 9 commits into from
Oct 9, 2023

Conversation

andymck
Copy link
Contributor

@andymck andymck commented Aug 23, 2023

Applies taskmanager control the the mobile config oracle

Removed some internal shutdown listeners on some of the services. Impact of these removals needs considered further and if required then will need to implement and alternative pattern

@andymck andymck marked this pull request as ready for review September 6, 2023 09:06
iot_config/Cargo.toml Outdated Show resolved Hide resolved
Co-authored-by: Jeff Grunewald <[email protected]>
@andymck
Copy link
Contributor Author

andymck commented Sep 6, 2023

@jeffgrunewald if you can pay particular attention to the removal of the shutdown listeners embedded within some of the services....

Copy link
Contributor

@jeffgrunewald jeffgrunewald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are several instances where i was passing a clone of the shutdown listener into a short-lived stream where i was assured it wasn't necessary and those didn't prove to solve the shutdown issues we have with the config service so i'm totally fine with those going. i'm still unclear about the long-lived streams spawned in the route_service.rs module that represent the grpc route updates subscription an HPR has to the config service but i believe @maplant was pretty sure those are also safe to stop monitoring and the tokio runtime would take care of their shutdown signals so if he can confirm that i'm okay simplifying that as well.

iot_config/src/route_service.rs Show resolved Hide resolved
iot_config/src/route_service.rs Show resolved Hide resolved
@andymck
Copy link
Contributor Author

andymck commented Sep 14, 2023

@jeffgrunewald I addressed your comments but if you can give another pass over those changes. I dont have enough context on that route service to feel comfortable with what is there right now

Copy link
Contributor

@jeffgrunewald jeffgrunewald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately @bbalser 's testing with the new streaming ingestor rpcs proved we do need shutdown listeners inside the spawned tasks that handle indefinite streaming RPCs so we'll need to keep the ones in each of the router_service.rs methods that take a GrpcStreamRequest or return a GrpcStreamResult type in order to shut down when OS sends the signal

.and_then(|_| stream_existing_devaddrs(&pool, &signing_key, tx.clone()))
.and_then(|_| stream_existing_skfs(&pool, &signing_key, tx.clone()))
.await
.is_err()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just call this combinator chain, map_err at the end where we keep the error trace and then await??

@jeffgrunewald jeffgrunewald merged commit 1d7058d into main Oct 9, 2023
1 check passed
@jeffgrunewald jeffgrunewald deleted the andymck/taskman/iot-config branch October 9, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants