shounakmk219 opened a new pull request, #10969:
URL: https://github.com/apache/pinot/pull/10969

   Expose an endpoint to perform safety check validation of the instance drop 
operation. Right now in order to drop an instance we can use 
   
   - `/instances/{instanceName}` with `DELETE` method type
   - `/instances/{instanceName}/state` 
   
   **Problem**
   Both the APIs perform the safety check validation before dropping the 
instance. The user is informed about the possible reasons, in case of an unsafe 
instance drop, only when the drop operation is actually performed.
   
   **Proposal**
   Instead of relying on the actual drop operation API to give back the reasons 
on why an operation is unsafe, we can have a validation endpoint that can be 
consumed and user can take required actions before performing the actual 
operation.
   
   Endpoint : `/instances/safetyCheck/dropInstance`
   Method type : `POST`
   Query param : `instanceNames` - list of instance names to validate for drop 
operation
   Sample Response : 
   
   ```
   [
     {
       "instanceName": "Server_192.168.1.3_7050",
       "safe": false,
       "issueList": [
         "Instance Server_192.168.1.3_7050 is still live",
         "Instance Server_192.168.1.3_7050 exists in ideal state for 
airlineStats_OFFLINE",
         "Instance Server_192.168.1.3_7050 exists in ideal state for 
airlineStats_REALTIME"
       ]
     },
     {
       "instanceName": "Broker_192.168.1.3_8000",
       "safe": true,
       "issueList": []
     }
   ]
   ```


-- 
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: commits-unsubscr...@pinot.apache.org

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


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

Reply via email to