Make filtering orchestrators that haven't been updated in last day optional #2073
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this pull request do? Explain your changes. (required)
This PR addresses #1482.
Based on the OP in the above issue and this comment I suspect the problem is that all orchestrator table queries will filter out any orchestrator entries that have not been updated in the last day. I had previously thought that existing orchestrator entries would be updated at least once a day when a new round is initialized as mentioned here. I'm still not sure why this wouldn't be happening. But, the screenshot provided in the OP of #1482 does indicate a
updatedAt
timestamp that is more than 1 day in the past which would explain the failed active check - theupdatedAt
timestamp was from 4/30/20 and the active check started failing on 5/5/20. Note: I'm assuming that the DB dump in that post was created on or after 5/5/20.So, the
updatedAt
check is my best guess of the problem right now and this PR disables theupdatedAt
check unless it is explicitly enabled usingDBOrchFilter.UpdatedLastDay
. The check is explicitly enabled inDBOrchestratorPoolCache
when deciding which orchestrators to query in order to preserve existing behavior for now - changes to this behavior can be considered separately.Also included some additional logging around the active check for informational purposes in case there is an additional problem in addition to the
updatedAt
check.Specific updates (required)
See commit history.
How did you test each of these updates (required)
Added unit tests.
Does this pull request close any open issues?
Fixes #1482
Checklist:
make
runs successfully./test.sh
pass