petrov-mg commented on code in PR #13101:
URL: https://github.com/apache/ignite/pull/13101#discussion_r3200409544
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/diagnostic/pagelocktracker/SharedPageLockTracker.java:
##########
@@ -320,17 +329,38 @@ public void stop() {
/**
*
*/
- private class TimeOutWorker extends CycleThread {
+ private class TimeOutWorker extends GridWorker {
+ /** Sleep interval before each iteration. */
+ private final long sleepInterval;
/**
+ * Creates new timeout worker with given parameters.
*
+ * @param sleepInterval sleep interval before each iteration
*/
- TimeOutWorker(long interval) {
- super("page-lock-tracker-timeout", interval);
+ protected TimeOutWorker(String igniteInstanceName, long sleepInterval,
IgniteLogger log) {
+ super(igniteInstanceName, "page-lock-tracker-timeout", log);
+
+ this.sleepInterval = sleepInterval;
}
/** {@inheritDoc} */
- @Override public void iteration() {
+ @SuppressWarnings("BusyWait")
+ @Override public final void body() {
+ try {
+ while (!runner().isInterrupted()) {
+ Thread.sleep(sleepInterval);
+
+ iteration();
+ }
+ }
+ catch (InterruptedException e) {
Review Comment:
Done.
##########
modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteKillTask.java:
##########
@@ -69,25 +72,19 @@ class IgniteKillTask extends ComputeTaskAdapter<Boolean,
Void> {
* Kill job.
*/
private class IgniteKillJob extends ComputeJobAdapter {
+ /** */
+ @IgniteInstanceResource
+ private Ignite ignite;
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]