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

Colossus state api re-factor #5059

Open
mnaamani opened this issue Jan 24, 2024 · 1 comment
Open

Colossus state api re-factor #5059

mnaamani opened this issue Jan 24, 2024 · 1 comment
Labels

Comments

@mnaamani
Copy link
Contributor

Evaluate need for state API endpoints:

  • /state/data-objects
    • Returns JSON array of all local data objects stored by node.
    • Was previously used by v3.8.x nodes to determine if a node should try to fetch an object from remote node. But we switched using simpler "dumb" approach of just trying all nodes where object is expected to be available. Mainly because the response size was on order of several megabytes, and seemed wasteful. It would now only serve as a "diagnostic" endpoint.
  • /state/bags/{bagId}/data-objects
    • This is similar to /state/data-objects but performs a gql query on each request and a potentially slow _.intersection() on large array.
  • /state/data
    • Returns usage size of uploads,temp,pending folders
    • On each request the stats are re-computed (lots of async fs i/o) seems wasteful and results should be cached
@mnaamani mnaamani changed the title Colossus state api Colossus state api re-factor Jan 24, 2024
@kdembler
Copy link
Member

kdembler commented Feb 2, 2024

This is potentially worth keeping for lead debugging purposes. We currently use that endpoint in a small tool to find missing objects. Possibly worth authenticating in some way though so it's not exposed publicly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants