Skip to content

graph: IPFS_MAX_ATTEMPTS ani-smap mechanism env var #5998

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

Merged
merged 2 commits into from
May 12, 2025
Merged

Conversation

rotarur
Copy link
Contributor

@rotarur rotarur commented May 9, 2025

This PR changes the hardcoded DEFAULT_MAX_ATTEMPTS to a configurable env var GRAPH_NODE_IPFS_MAX_ATTEMPTS to avoid spamming the IPFS on deterministic errors

@rotarur rotarur force-pushed the ipfs-max-attempts branch from 348af22 to 8c6ed35 Compare May 9, 2025 17:44
@rotarur rotarur force-pushed the ipfs-max-attempts branch from 8c6ed35 to d02a0f2 Compare May 9, 2025 17:45
@fordN
Copy link
Contributor

fordN commented May 9, 2025

Is this really just for deterministic errors? I don't see anything that is classifying the errors as deterministic and only hitting max for those.

Copy link
Contributor

@sirenko sirenko left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -87,6 +87,9 @@ those.
- `GRAPH_MAX_IPFS_CACHE_SIZE`: maximum number of files cached (defaults to 50).
- `GRAPH_MAX_IPFS_CACHE_FILE_SIZE`: maximum size of each cached file (in bytes, defaults to 1MiB).
- `GRAPH_IPFS_REQUEST_LIMIT`: Limits the number of requests per second to IPFS for file data sources.
- `GRAPH_IPFS_MAX_ATTEMPTS`: Safety mechanism to prevent infinite spamming
of IPFS servers in the event of logical or unhandled deterministic
error (default: 100 000)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The description should explain what this variable does, not why you would want to use it. Also the next line seems to belong to GRAPH_IPFS_REQUEST_LIMIT

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, will fix that and add a better description

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@rotarur rotarur requested a review from lutter May 12, 2025 14:08
@rotarur rotarur merged commit e50cbda into master May 12, 2025
6 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
Development

Successfully merging this pull request may close these issues.

5 participants