-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
IGNITE-23655 Introduce CacheIdleVerifyCancelCommand #11673
base: master
Are you sure you want to change the base?
Conversation
/** | ||
* Cancels idle_verify command. | ||
*/ | ||
public class CacheIdleVerifyCancelCommand implements ComputeCommand<NoArg, Void>, Serializable { |
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.
Whe command implement Serializable?
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.
removed
|
||
/** {@inheritDoc} */ | ||
@Override public String description() { | ||
return "Cancels idle_verify command."; |
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.
Please, remove, dot in the end of line.
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.
removed
|
||
/** {@inheritDoc} */ | ||
@Override protected Void run(NoArg arg) { | ||
if (idleVerifyId().isPresent()) |
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.
Can be replaced with ifPresent
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.
refactored
|
||
int idleVerifyCnt = 0; | ||
|
||
for (ComputeTaskView view : srv.context().systemView().<ComputeTaskView>view(TASKS_VIEW)) { |
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.
System view are local.
Let's iterate started servers and check them all.
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.
checked all servers
for (int i = 0; i < 100000; i++) | ||
cache.put(i, i); | ||
|
||
new Thread(() -> execute("--cache", "idle_verify") ).start(); |
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.
--cache idle_verify
don't return while command ends?
If yes, we need to do the following:
- Start with
GridTestUtils.runAsync
which returns Future. - Check future not done.
- Cancel command.
- Check future done.
- Other checks for all servers.
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.
refactored
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.
- Check future done.
AFAICS this not implemented.
.../src/main/java/org/apache/ignite/internal/management/cache/CacheIdleVerifyCancelCommand.java
Outdated
Show resolved
Hide resolved
We have some tests that check Did you got bot visa for this PR? |
82cce7f
to
3afb342
Compare
…ts cancelling is printed in ouput.
|
||
srv.cluster().state(ACTIVE); | ||
|
||
IgniteCache<Integer, Integer> cache = srv.createCache(DEFAULT_CACHE_NAME); |
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.
Default backup count are 0.
Which means idle_verify will run on one node only.
Let's configure gridsCnt == CacheConfiguration.backup == 3
in this test.
6e3add7
to
9a0a1c7
Compare
9a0a1c7
to
1bf8664
Compare
…sn't track views.
…upPartitionJobV2#execute.
e455147
to
f583f41
Compare
…er task views (it seems to be unnecessary). Added log listener and it fails.
6938157
to
602e674
Compare
…passed except cases when idle verify command is finished immediately (before idle verify --cancel is called).
…. Also added testIdleVerifyTrackedForkJoinPool that waits on beforeCancelLatch.await(). Overriden submit method for custom ForkJoinPool is not reached although pool.submit in calculatePartitionHashAsync is reached.
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summary
whereXXXX
- number of JIRA issue.(see the Maintainers list)
the
green visa
attached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.