masa-finance / roadmap

The protocol
0 stars 0 forks source link

bug: fix local worker returning errors and breaking sendWork goroutine #68

Closed teslashibe closed 3 months ago

teslashibe commented 3 months ago

As a result of #448 we have found that a local worker always returns the response from self and will not send the work to the network if the following cases:

  1. Credentials incorrect
  2. 429 - the Twitter rate limit has been reached
  3. Any other error with the local workers connection

Open questions

  1. How do I as a developer running a worker know that any of the above are happening in node?
  2. Ensure all errors are caught and logged but the goroutine is NOT broken
teslashibe commented 3 months ago

@mudler @Luka-Loncar @5u6r054 this is as a result of https://github.com/masa-finance/masa-oracle/issues/448 and will be tested by tomorrow (Thursday 25th)

mudler commented 3 months ago

The behavior described in the step 2) might be covered already by https://github.com/masa-finance/masa-oracle/pull/452

mudler commented 3 months ago

what is left here is QA once https://github.com/masa-finance/masa-oracle/pull/452 is merged

restevens402 commented 3 months ago

Walked through changes applied by @jdutchak yesterday that cover these issues. The SendWork has been updated to allow for errors locally and continue to send work to remote workers. An accumulator was added that ensures that a node has the ability to receive non-error responses.

Furthermore, we have planned improvements in the SendWork to optimize which nodes to send work to and limit it to N number of nodes that are active and capable of servicing the specific request. Details are in: https://github.com/masa-finance/roadmap/issues/12

Given this information, this ticket can be marked as done.

mudler commented 3 months ago

This one is fixed and we are working already around https://github.com/masa-finance/roadmap/issues/12 to improve and optimize the current implementation