public async Task DeleteMembershipTableEntries(string deploymentId)
        {
            try
            {
                var keys = new Dictionary<string, AttributeValue> { { $":{SiloInstanceRecord.DEPLOYMENT_ID_PROPERTY_NAME}", new AttributeValue(deploymentId) } };
                var records = await storage.QueryAsync(TABLE_NAME_DEFAULT_VALUE, keys, $"{SiloInstanceRecord.DEPLOYMENT_ID_PROPERTY_NAME} = :{SiloInstanceRecord.DEPLOYMENT_ID_PROPERTY_NAME}", item => new SiloInstanceRecord(item));

                var toDelete = new List<Dictionary<string, AttributeValue>>();
                foreach (var record in records)
                {
                    toDelete.Add(record.GetKeys());
                }

                List<Task> tasks = new List<Task>();
                foreach (var batch in toDelete.BatchIEnumerable(MAX_BATCH_SIZE))
                {
                    tasks.Add(storage.DeleteEntriesAsync(TABLE_NAME_DEFAULT_VALUE, batch));
                }
                await Task.WhenAll(tasks);
            }
            catch (Exception exc)
            {
                logger.Error(ErrorCode.MembershipBase, string.Format("Unable to delete membership records on table {0} for deploymentId {1}: Exception={2}",
                    TABLE_NAME_DEFAULT_VALUE, deploymentId, exc));
                throw;
            }
        }
 internal async Task<int> DeleteTableEntries()
 {
     var entries = await storage.ReadAllTableEntriesForPartitionAsync(GlobalServiceId).ConfigureAwait(false);
     var entriesList = new List<Tuple<GossipTableEntry, string>>(entries);
     if (entriesList.Count <= AzureTableDefaultPolicies.MAX_BULK_UPDATE_ROWS)
     {
         await storage.DeleteTableEntriesAsync(entriesList).ConfigureAwait(false);
     }
     else
     {
         List<Task> tasks = new List<Task>();
         foreach (var batch in entriesList.BatchIEnumerable(AzureTableDefaultPolicies.MAX_BULK_UPDATE_ROWS))
         {
             tasks.Add(storage.DeleteTableEntriesAsync(batch));
         }
         await Task.WhenAll(tasks).ConfigureAwait(false);
     }
     return entriesList.Count;
 }
        internal async Task<int> DeleteTableEntries(string deploymentId)
        {
            if (deploymentId == null) throw new ArgumentNullException("deploymentId");

            var entries = await storage.ReadAllTableEntriesForPartitionAsync(deploymentId);
            var entriesList = new List<Tuple<SiloInstanceTableEntry, string>>(entries);
            if (entriesList.Count <= AzureTableDefaultPolicies.MAX_BULK_UPDATE_ROWS)
            {
                await storage.DeleteTableEntriesAsync(entriesList);
            }else
            {
                List<Task> tasks = new List<Task>();
                foreach (var batch in entriesList.BatchIEnumerable(AzureTableDefaultPolicies.MAX_BULK_UPDATE_ROWS))
                {
                    tasks.Add(storage.DeleteTableEntriesAsync(batch));
                }
                await Task.WhenAll(tasks);
            }
            return entriesList.Count();
        }