This is an automated email from the ASF dual-hosted git repository.

NSAmelchev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 350072e6163 IGNITE-29275 Remove unused end time tracking from cache 
futures (#13815)
350072e6163 is described below

commit 350072e6163d407ba803b710390a1a1fc944e275
Author: Nikita Amelchev <[email protected]>
AuthorDate: Thu Nov 12 11:58:25 2026 +0300

    IGNITE-29275 Remove unused end time tracking from cache futures (#13815)
---
 .../processors/cache/GridCacheCompoundFuture.java   | 20 --------------------
 .../cache/GridCacheCompoundIdentityFuture.java      | 20 --------------------
 .../internal/processors/cache/GridCacheFuture.java  |  8 --------
 .../processors/cache/GridCacheFutureAdapter.java    | 21 ---------------------
 4 files changed, 69 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundFuture.java
index c0c1f0e59d8..422192bf5a4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundFuture.java
@@ -29,9 +29,6 @@ public abstract class GridCacheCompoundFuture<T, R> extends 
GridCompoundFuture<T
     /** Future start time. */
     private final long startTime = U.currentTimeMillis();
 
-    /** Future end time. */
-    private volatile long endTime;
-
     /**
      * @param rdc Reducer.
      */
@@ -43,21 +40,4 @@ public abstract class GridCacheCompoundFuture<T, R> extends 
GridCompoundFuture<T
     @Override public long startTime() {
         return startTime;
     }
-
-    /** {@inheritDoc} */
-    @Override public long duration() {
-        long endTime = this.endTime;
-
-        return (endTime == 0 ? U.currentTimeMillis() : endTime) - startTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean onDone(@Nullable R res, @Nullable Throwable 
err, boolean cancel) {
-        if (super.onDone(res, err, cancel)) {
-            endTime = U.currentTimeMillis();
-            return true;
-        }
-
-        return false;
-    }
 }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundIdentityFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundIdentityFuture.java
index a21434c1e9a..78811f47e27 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundIdentityFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheCompoundIdentityFuture.java
@@ -29,9 +29,6 @@ public abstract class GridCacheCompoundIdentityFuture<T> 
extends GridCompoundIde
     /** Future start time. */
     private final long startTime = U.currentTimeMillis();
 
-    /** Future end time. */
-    private volatile long endTime;
-
     /**
      * @param rdc Reducer.
      */
@@ -43,21 +40,4 @@ public abstract class GridCacheCompoundIdentityFuture<T> 
extends GridCompoundIde
     @Override public long startTime() {
         return startTime;
     }
-
-    /** {@inheritDoc} */
-    @Override public long duration() {
-        long endTime = this.endTime;
-
-        return (endTime == 0 ? U.currentTimeMillis() : endTime) - startTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean onDone(@Nullable T res, @Nullable Throwable 
err, boolean cancel) {
-        if (super.onDone(res, err, cancel)) {
-            endTime = U.currentTimeMillis();
-            return true;
-        }
-
-        return false;
-    }
 }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFuture.java
index 2828a495535..548284825fb 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFuture.java
@@ -32,14 +32,6 @@ public interface GridCacheFuture<R> extends 
IgniteInternalFuture<R> {
      */
     public long startTime();
 
-    /**
-     * Gets duration in milliseconds between start of the future and current 
time if future
-     * is not finished, or between start and finish of this future.
-     *
-     * @return Time in milliseconds this future has taken to execute.
-     */
-    public long duration();
-
     /**
      * @return Unique identifier for this future.
      */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFutureAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFutureAdapter.java
index c3e470e4cdb..390805a467d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFutureAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheFutureAdapter.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.jetbrains.annotations.Nullable;
 
 /**
  *
@@ -28,9 +27,6 @@ public abstract class GridCacheFutureAdapter<R> extends 
GridFutureAdapter<R> imp
     /** Future start time. */
     private final long startTime = U.currentTimeMillis();
 
-    /** Future end time. */
-    private volatile long endTime;
-
     /**
      * Default constructor.
      */
@@ -42,21 +38,4 @@ public abstract class GridCacheFutureAdapter<R> extends 
GridFutureAdapter<R> imp
     @Override public long startTime() {
         return startTime;
     }
-
-    /** {@inheritDoc} */
-    @Override public long duration() {
-        long endTime = this.endTime;
-
-        return endTime == 0 ? U.currentTimeMillis() - startTime : endTime - 
startTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean onDone(@Nullable R res, @Nullable Throwable 
err, boolean cancel) {
-        if (super.onDone(res, err, cancel)) {
-            endTime = U.currentTimeMillis();
-            return true;
-        }
-
-        return false;
-    }
 }

Reply via email to