-
Notifications
You must be signed in to change notification settings - Fork 364
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
fix(operator): Operator panic's when reconnect fails after max retries #1692
base: staging
Are you sure you want to change the base?
fix(operator): Operator panic's when reconnect fails after max retries #1692
Conversation
core/retry.go
Outdated
RespondToTaskV2MaxElapsedTime = 0 // Maximum time all retries may take. `0` corresponds to no limit on the time of the retries. | ||
RespondToTaskV2NumRetries = 0 // Total number of retries attempted. If 0, retries indefinitely until maxElapsedTime is reached. | ||
|
||
// Retry Parameters for SubscribeToNewTasksV3 |
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.
// Retry Parameters for SubscribeToNewTasksV3 | |
// Retry Parameters for SubscribeToNewTasks |
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.
addressed!
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.
Works in my machine! Maybe we should add logs for each retry to warn that we are trying to reconnect. Otherwise, it might seem like nothing is happening.
Agreed! @JuArce should we do this in a separate pr. |
Fix: Operator Panic when reconnect fails after max Retries
Description
Closes #960. When
SubscribeToNewTasksV2Retryable
andSubscribeToNewTasksV3Retryable
exhaust the maximum number of retries the respective subscribe functions panics due to dereferencing anil
reference within the generated contract bindings. This pr addressed this issue by:1.) Adding a
defer()
to the go routine the converts the panic into an error before the operator process exits.2.) Changing the retry parameters for
SubscribeToNewTasksV2Retryable
andSubscribeToNewTasksV3Retryable
to retry infinitely (up to retry intervals of 60 sec).To Test:
brew install nginx
config-files
within the aligned-layer repo to use:8082/main/
port and path.make anvil_start_with_block_time
docker compose -f nginx-docker-compose.yaml up -d
docker compose -f nginx-docker-compose.yaml stop
docker compose -f nginx-docker-compose.yaml up -d
&& restart the aggregatormake aggregator_start
Type of change
Please delete options that are not relevant.
Checklist
testnet
, everything else tostaging