You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by wi...@apache.org on 2023/09/09 01:31:26 UTC

[ratis] branch snapshot-branch2 updated (1aeb69d60 -> e17d2cd73)

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

williamsong pushed a change to branch snapshot-branch2
in repository https://gitbox.apache.org/repos/asf/ratis.git


 discard 1aeb69d60 upgrade snapshot version
     new 284ecbb25 RATIS-1884. Fix retry cache warning condition (#915)
     new e17d2cd73 upgrade ratis snapshot version

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1aeb69d60)
            \
             N -- N -- N   refs/heads/snapshot-branch2 (e17d2cd73)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                                               | 4 ++--
 ratis-assembly/pom.xml                                                | 2 +-
 ratis-client/pom.xml                                                  | 2 +-
 ratis-common/pom.xml                                                  | 2 +-
 ratis-docs/pom.xml                                                    | 2 +-
 ratis-docs/src/site/markdown/configuraions.md                         | 2 ++
 ratis-examples/pom.xml                                                | 2 +-
 ratis-experiments/pom.xml                                             | 2 +-
 ratis-grpc/pom.xml                                                    | 2 +-
 ratis-metrics/pom.xml                                                 | 2 +-
 ratis-netty/pom.xml                                                   | 2 +-
 ratis-proto/pom.xml                                                   | 2 +-
 ratis-replicated-map/pom.xml                                          | 2 +-
 ratis-resource-bundle/pom.xml                                         | 2 +-
 ratis-server-api/pom.xml                                              | 2 +-
 .../src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java   | 1 +
 ratis-server/pom.xml                                                  | 2 +-
 .../src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java    | 2 +-
 ratis-shell/pom.xml                                                   | 2 +-
 ratis-test/pom.xml                                                    | 2 +-
 ratis-tools/pom.xml                                                   | 2 +-
 21 files changed, 23 insertions(+), 20 deletions(-)


[ratis] 02/02: upgrade ratis snapshot version

Posted by wi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

williamsong pushed a commit to branch snapshot-branch2
in repository https://gitbox.apache.org/repos/asf/ratis.git

commit e17d2cd73a9b9fff7ec876c0dee6ee89670c7d3b
Author: szywilliam <sz...@163.com>
AuthorDate: Sat Sep 9 09:31:07 2023 +0800

    upgrade ratis snapshot version
---
 pom.xml                       | 4 ++--
 ratis-assembly/pom.xml        | 2 +-
 ratis-client/pom.xml          | 2 +-
 ratis-common/pom.xml          | 2 +-
 ratis-docs/pom.xml            | 2 +-
 ratis-examples/pom.xml        | 2 +-
 ratis-experiments/pom.xml     | 2 +-
 ratis-grpc/pom.xml            | 2 +-
 ratis-metrics/pom.xml         | 2 +-
 ratis-netty/pom.xml           | 2 +-
 ratis-proto/pom.xml           | 2 +-
 ratis-replicated-map/pom.xml  | 2 +-
 ratis-resource-bundle/pom.xml | 2 +-
 ratis-server-api/pom.xml      | 2 +-
 ratis-server/pom.xml          | 2 +-
 ratis-shell/pom.xml           | 2 +-
 ratis-test/pom.xml            | 2 +-
 ratis-tools/pom.xml           | 2 +-
 18 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2d63a7d8e..96f847e86 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
 
   <artifactId>ratis</artifactId>
   <groupId>org.apache.ratis</groupId>
-  <version>2.5.1-SNAPSHOT</version>
+  <version>2.5.2-284ecbb-SNAPSHOT</version>
   <name>Apache Ratis</name>
   <packaging>pom</packaging>
   <description>
@@ -160,7 +160,7 @@
 
 
   <properties>
-    <project.build.outputTimestamp>2023-01-01T00:00:00Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2023-09-07T10:05:25Z</project.build.outputTimestamp>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
      <!-- where to find the generated LICENSE files -->
diff --git a/ratis-assembly/pom.xml b/ratis-assembly/pom.xml
index f968eea92..3a5394cb0 100644
--- a/ratis-assembly/pom.xml
+++ b/ratis-assembly/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-assembly</artifactId>
diff --git a/ratis-client/pom.xml b/ratis-client/pom.xml
index 9ecc549b5..7564a5cf0 100644
--- a/ratis-client/pom.xml
+++ b/ratis-client/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-client</artifactId>
diff --git a/ratis-common/pom.xml b/ratis-common/pom.xml
index 10c5ec129..094e556dd 100644
--- a/ratis-common/pom.xml
+++ b/ratis-common/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-common</artifactId>
diff --git a/ratis-docs/pom.xml b/ratis-docs/pom.xml
index 6060c6598..36463d825 100644
--- a/ratis-docs/pom.xml
+++ b/ratis-docs/pom.xml
@@ -20,7 +20,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-docs</artifactId>
diff --git a/ratis-examples/pom.xml b/ratis-examples/pom.xml
index e0f15d56c..e8fb77a4b 100644
--- a/ratis-examples/pom.xml
+++ b/ratis-examples/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-examples</artifactId>
diff --git a/ratis-experiments/pom.xml b/ratis-experiments/pom.xml
index 23f057f74..fa255c1a0 100644
--- a/ratis-experiments/pom.xml
+++ b/ratis-experiments/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-experiments</artifactId>
diff --git a/ratis-grpc/pom.xml b/ratis-grpc/pom.xml
index d120e02d7..ec3ec92bf 100644
--- a/ratis-grpc/pom.xml
+++ b/ratis-grpc/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-grpc</artifactId>
diff --git a/ratis-metrics/pom.xml b/ratis-metrics/pom.xml
index caab6d4e8..c89b9b069 100644
--- a/ratis-metrics/pom.xml
+++ b/ratis-metrics/pom.xml
@@ -18,7 +18,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-metrics</artifactId>
diff --git a/ratis-netty/pom.xml b/ratis-netty/pom.xml
index 36786a4e7..f7c2ec0a3 100644
--- a/ratis-netty/pom.xml
+++ b/ratis-netty/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-netty</artifactId>
diff --git a/ratis-proto/pom.xml b/ratis-proto/pom.xml
index 2b6c8aa86..883559745 100644
--- a/ratis-proto/pom.xml
+++ b/ratis-proto/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-proto</artifactId>
diff --git a/ratis-replicated-map/pom.xml b/ratis-replicated-map/pom.xml
index 33bea2341..4b59c1950 100644
--- a/ratis-replicated-map/pom.xml
+++ b/ratis-replicated-map/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-replicated-map</artifactId>
diff --git a/ratis-resource-bundle/pom.xml b/ratis-resource-bundle/pom.xml
index 88f294dd5..f7ab55bc8 100644
--- a/ratis-resource-bundle/pom.xml
+++ b/ratis-resource-bundle/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/ratis-server-api/pom.xml b/ratis-server-api/pom.xml
index c342ba0d0..fcd68b8b3 100644
--- a/ratis-server-api/pom.xml
+++ b/ratis-server-api/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-server-api</artifactId>
diff --git a/ratis-server/pom.xml b/ratis-server/pom.xml
index d9b045db8..a68fbb444 100644
--- a/ratis-server/pom.xml
+++ b/ratis-server/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-server</artifactId>
diff --git a/ratis-shell/pom.xml b/ratis-shell/pom.xml
index f22d90fbc..ae044f09d 100644
--- a/ratis-shell/pom.xml
+++ b/ratis-shell/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-shell</artifactId>
diff --git a/ratis-test/pom.xml b/ratis-test/pom.xml
index b7e036e2e..2275cb04e 100644
--- a/ratis-test/pom.xml
+++ b/ratis-test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-test</artifactId>
diff --git a/ratis-tools/pom.xml b/ratis-tools/pom.xml
index 1fc865035..0ff4d9251 100644
--- a/ratis-tools/pom.xml
+++ b/ratis-tools/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <artifactId>ratis</artifactId>
     <groupId>org.apache.ratis</groupId>
-    <version>2.5.1-SNAPSHOT</version>
+    <version>2.5.2-284ecbb-SNAPSHOT</version>
   </parent>
 
   <artifactId>ratis-tools</artifactId>


[ratis] 01/02: RATIS-1884. Fix retry cache warning condition (#915)

Posted by wi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

williamsong pushed a commit to branch snapshot-branch2
in repository https://gitbox.apache.org/repos/asf/ratis.git

commit 284ecbb25cb60a2ea3fde07fb71672fb122f53ac
Author: William Song <48...@users.noreply.github.com>
AuthorDate: Wed Sep 6 02:19:00 2023 +0800

    RATIS-1884. Fix retry cache warning condition (#915)
    
    (cherry picked from commit 4e5443a4f2e76af060c3725663de3ae73603c50d)
---
 ratis-docs/src/site/markdown/configuraions.md                           | 2 ++
 .../src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java     | 1 +
 .../src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java      | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ratis-docs/src/site/markdown/configuraions.md b/ratis-docs/src/site/markdown/configuraions.md
index 80e87fc4b..a0b79715b 100644
--- a/ratis-docs/src/site/markdown/configuraions.md
+++ b/ratis-docs/src/site/markdown/configuraions.md
@@ -544,6 +544,8 @@ Note that `slowness.timeout` is use in two places:
 | **Description** | expire time of retry cache entry     |
 | **Type**        | TimeDuration                         |
 | **Default**     | 60s                                  |
+Note that we should set an expiration time longer than the total retry waiting duration of clients 
+in order to ensure exactly-once semantic.
 
 | **Property**    | `raft.server.retrycache.statistics.expire-time` |
 |:----------------|:------------------------------------------------|
diff --git a/ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java b/ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
index 8665c8874..d095af20c 100644
--- a/ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
+++ b/ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
@@ -761,6 +761,7 @@ public interface RaftServerConfigKeys {
   interface RetryCache {
     String PREFIX = RaftServerConfigKeys.PREFIX + ".retrycache";
 
+    /** We should set expiry time longer than total client retry to guarantee exactly-once semantic */
     String EXPIRY_TIME_KEY = PREFIX + ".expirytime";
     TimeDuration EXPIRY_TIME_DEFAULT = TimeDuration.valueOf(60, TimeUnit.SECONDS);
     static TimeDuration expiryTime(RaftProperties properties) {
diff --git a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
index 9f3f7982d..55a5f499b 100644
--- a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
+++ b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
@@ -1731,7 +1731,7 @@ class RaftServerImpl implements RaftServer.Division,
     // update the retry cache
     final CacheEntry cacheEntry = retryCache.getOrCreateEntry(invocationId);
     Preconditions.assertTrue(cacheEntry != null);
-    if (getInfo().isLeader() && !cacheEntry.isCompletedNormally()) {
+    if (getInfo().isLeader() && cacheEntry.isCompletedNormally()) {
       LOG.warn("{} retry cache entry of leader should be pending: {}", this, cacheEntry);
     }
     if (cacheEntry.isFailed()) {