swamirishi commented on PR #7988:
URL: https://github.com/apache/ozone/pull/7988#issuecomment-2866488435

   @ivanandikashopee Amongst the snapshot operation GetSnapshotInfo, 
ListSnapshots, ListSnapshotDiffJobs are relatively lightweight operations and 
only SnapshotDiff is actually an expensive operation. I don't really like the 
idea of client dictating which OM should run the snapshotDiff operation. The 
leader should dictate this. The leader can perform the following operation on 
each and every snapshot diff operation:
   
   1. Client asks leader to run a snapshot diff operation.
   2. Let us add a command like CheckSnapshotDiif command on OM with request 
and response of the following structure.
   ```
   Request : 
          volumeName 
          bucketName
          sourceSnapshot
          targetSnapshot
   
   Response:
          omEndpoint
          totalNumberOfSnapshotDiffOpsInQueue(optional) // only to be returned 
when running on follower
          hasOp (true if the snapshot diff is already in progress or results 
are already computed)
          snapshotsExists(true if both source and target snapshot exist 
otherwise false)[Snapshots need not have been created on the follower]
   ```
    This operation when run on leader where the leader figures out if it has 
already computed snapshot diff in it's own local system if yes then returns 
it's own endpoint as the response. Otherwise the leader should hit the same 
command on the follower where it checks if any of the followers has done 
performed this operation which as a response should also return the total 
number of snapshotDiff operations in the follower's own queue.
   If the snapshot diff is already being computed in some node then the leader 
can just return the endpoint of the follower. Otherwise based on the 
totalNumberOfSnapshotDiffOpsInQueue in the responses sent by the followers the 
leader can just load balance the snapshot diff operation and return the om 
endpoint where this operation is supposed to run.
   
   3. Now given that the client has the endpoint, it can run the snapshotDiff 
command on the particular endpoint and can poll the particular om for the 
snapshot diff result.
   
   


-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to