-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add lastExecutionTime for autofollow coroutine #508
Conversation
Codecov Report
@@ Coverage Diff @@
## main #508 +/- ##
============================================
- Coverage 75.16% 72.33% -2.84%
+ Complexity 1007 988 -19
============================================
Files 141 141
Lines 4579 4591 +12
Branches 506 510 +4
============================================
- Hits 3442 3321 -121
- Misses 823 951 +128
- Partials 314 319 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -45,6 +45,7 @@ import org.opensearch.tasks.TaskId | |||
import org.opensearch.threadpool.Scheduler | |||
import org.opensearch.threadpool.ThreadPool | |||
import java.util.concurrent.ConcurrentSkipListSet | |||
import kotlin.collections.HashMap |
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.
If not used, Lets remove the import
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.
Yep
@@ -95,6 +95,7 @@ class UpdateAutoFollowPatternIT: MultiClusterRestTestCase() { | |||
var af_stats = stats.get("autofollow_stats")!! as ArrayList<HashMap<String, Any>> | |||
for (key in af_stats) { | |||
assert(key["num_success_start_replication"]!! as Int == 2) | |||
assert(key["last_execution_time"]!! as Long != 0L) |
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.
Could we add checks after the poll duration as well?
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.
Added.
Signed-off-by: Ankit Kala <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.1 1.1
# Navigate to the new working tree
cd .worktrees/backport-1.1
# Create a new branch
git switch --create backport/backport-508-to-1.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8f0a55c9a7e32f643345a972d28e4829d7e3c530
# Push it to GitHub
git push --set-upstream origin backport/backport-508-to-1.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.1 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.2 1.2
# Navigate to the new working tree
cd .worktrees/backport-1.2
# Create a new branch
git switch --create backport/backport-508-to-1.2
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8f0a55c9a7e32f643345a972d28e4829d7e3c530
# Push it to GitHub
git push --set-upstream origin backport/backport-508-to-1.2
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.2 Then, create a pull request where the |
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c) Co-authored-by: Ankit Kala <[email protected]>
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c) Co-authored-by: Ankit Kala <[email protected]>
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c) Co-authored-by: Ankit Kala <[email protected]>
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c) Co-authored-by: Ankit Kala <[email protected]>
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c) Co-authored-by: Ankit Kala <[email protected]>
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> (cherry picked from commit 8f0a55c)
Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]> Signed-off-by: Ankit Kala <[email protected]>
Signed-off-by: Ankit Kala [email protected]
Description
Currently if the autofollow coroutine is not getting executed for any reason, there is no mechanism to get visibility into that.
This change adds a new key
last_execution_time
in the autofollow stats which user can monitor to ensure that autofollow task is getting executed as expected.Issues Resolved
485
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.