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

nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new 6fc50e36b [CELEBORN-1631][FOLLOWUP] Add latest snapshot index in 
message of HandleResponse for /snapshot/create
6fc50e36b is described below

commit 6fc50e36b936f365d1718054e1a8861fb313e07e
Author: SteNicholas <[email protected]>
AuthorDate: Wed Nov 20 11:38:29 2024 +0800

    [CELEBORN-1631][FOLLOWUP] Add latest snapshot index in message of 
HandleResponse for /snapshot/create
    
    ### What changes were proposed in this pull request?
    
    Add latest snapshot index in message of `HandleResponse` for 
`/snapshot/create`.
    
    ### Why are the changes needed?
    
    
[TakeSnapshotCommand.java#68](https://github.com/apache/ratis/blob/master/ratis-shell/src/main/java/org/apache/ratis/shell/cli/sh/snapshot/TakeSnapshotCommand.java#L68)
 prints the latest snapshot index. Therefore,  the message of `HandleResponse` 
for `/snapshot/create` could also provide the latest snapshot index.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    CI.
    
    Closes #2908 from SteNicholas/CELEBORN-1631.
    
    Authored-by: SteNicholas <[email protected]>
    Signed-off-by: SteNicholas <[email protected]>
---
 .../celeborn/service/deploy/master/http/api/v1/RatisResource.scala      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/http/api/v1/RatisResource.scala
 
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/http/api/v1/RatisResource.scala
index 04e94c4ba..7447a461e 100644
--- 
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/http/api/v1/RatisResource.scala
+++ 
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/http/api/v1/RatisResource.scala
@@ -241,7 +241,7 @@ class RatisResource extends ApiRequestContext with Logging {
     val reply = ratisServer.getServer.snapshotManagement(request)
     if (reply.isSuccess) {
       new HandleResponse().success(true).message(
-        s"Successfully create snapshot at ${ratisServer.getLocalAddress}.")
+        s"Successfully create snapshot at ${ratisServer.getLocalAddress}. The 
latest snapshot index is ${reply.getLogIndex}.")
     } else {
       new HandleResponse().success(false).message(
         s"Failed to create snapshot at ${ratisServer.getLocalAddress}. $reply")

Reply via email to