public async Task DeleteStorageGroupAsync()

in src/Apache.IoTDB/SessionPool.cs [391:435]


        public async Task<int> DeleteStorageGroupAsync(string groupName)
        {
            var client = _clients.Take();
            try
            {
                var status = await client.ServiceClient.deleteStorageGroupsAsync(
                    client.SessionId,
                    new List<string> { groupName });

                if (_debugMode)
                {
                    _logger.LogInformation($"delete storage group {groupName} successfully, server message is {status?.Message}");
                }

                return _utilFunctions.VerifySuccess(status, SuccessCode, RedirectRecommendCode);

            }
            catch (TException e)
            {
                await Open(_enableRpcCompression);
                client = _clients.Take();
                try
                {
                    var status = await client.ServiceClient.deleteStorageGroupsAsync(
                        client.SessionId,
                        new List<string> { groupName });

                    if (_debugMode)
                    {
                        _logger.LogInformation($"delete storage group {groupName} successfully, server message is {status?.Message}");
                    }

                    return _utilFunctions.VerifySuccess(status, SuccessCode, RedirectRecommendCode);

                }
                catch (TException ex)
                {
                    throw new TException("Error occurs when deleting storage group", ex);
                }
            }
            finally
            {
                _clients.Add(client);
            }
        }