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

implement data task #208

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

gvaradarajan
Copy link
Member

@gvaradarajan gvaradarajan commented May 17, 2024

This required an increase in main task stack size from 22528 -> 35840, which is not a reasonable increase, but I figured while I tried to diagnose the source of excess stack usage I would open a draft PR and see if anyone on the team has a better intuition for where the problem(s) might be.

EDIT: Pinning the future returned by ViamServer::serve appears to have fixed it. Planning to do more testing before taking the PR out of draft.

@gvaradarajan gvaradarajan force-pushed the data_sync_task branch 2 times, most recently from fe08f0d to e1a42b6 Compare May 18, 2024 03:37
@gvaradarajan gvaradarajan marked this pull request as ready for review May 20, 2024 14:01
@gvaradarajan gvaradarajan requested a review from a team as a code owner May 20, 2024 14:01
micro-rdk/src/common/data_collector.rs Show resolved Hide resolved
micro-rdk/src/common/data_store.rs Show resolved Hide resolved
@@ -60,7 +61,7 @@ pub async fn serve_web_inner(
// instantiate the Async<TCPStream> for the connection to app.viam.com
// otherwise there is a chance a race happens and will listen to events before full
// initialization is done
let _ = Timer::after(std::time::Duration::from_millis(60)).await;
let _ = Box::pin(Timer::after(std::time::Duration::from_millis(60))).await;
Copy link
Member

Choose a reason for hiding this comment

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

  • Can we add another block comment here explaining why this is Box::pin.
  • I noticed that the native entry point does not have this wait. Should it? If not, why does it not need it but esp32 does? Is the comment still correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

  • I forgot to take this out. I don't think it's necessary but I'll test to make sure
  • I actually don't know, but the native server appears to work without it

micro-rdk/src/esp32/entry.rs Show resolved Hide resolved
micro-rdk/src/esp32/entry.rs Show resolved Hide resolved
micro-rdk/src/esp32/entry.rs Show resolved Hide resolved
robot.clone(),
);
}
let data_manager_svc = match DataManager::<StaticMemoryDataStore>::from_robot_and_config(
Copy link
Member

Choose a reason for hiding this comment

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

All relevant from esp32/entry.rs are re-iterated for this file.

micro-rdk/src/common/data_manager.rs Show resolved Hide resolved
micro-rdk/src/common/data_manager.rs Show resolved Hide resolved
micro-rdk/src/common/data_manager.rs Outdated Show resolved Hide resolved
Copy link
Member

@acmorrow acmorrow left a comment

Choose a reason for hiding this comment

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

LGTM

@gvaradarajan gvaradarajan merged commit fdb7e49 into viamrobotics:main May 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants